If I have a composite type 

type Foo
  a
  b
  c
end

I can initialize it with a vector like this:

x = Foo([1,2,3]...)

But how can I get the fields as a vector, eg [x.a,x.b,x.c] without
enumerating them? convert(x, Vector) does not work.

I need this to go back and forth between the type and the vector
representation of a set of parameters when using NLopt.

Best,

Tamas

Reply via email to