On Friday, 23 May 2014 04:48:29 UTC+1, Thomas Covert wrote:
>
> Why is the following code not allowed?
>
> *julia> **type TC*
>
> *c::Cholesky{Float64}*
>
> *end*
>
> *ERROR: Cholesky not defined*
>
>
>
For some reason the Cholesky type is not exported from the Base module. The
easiest solution is to `import Base.Cholesky` beforehand.
> As a side note, for this use case, should I be using immutable composite
> types or mutable composite types? Is my intuition that over-writing a
> single instance of a composite type will be more efficient than allocating
> and garbage collecting all of the intermediate results over-and-over again?
>
I'm not sure if there are any hard and fast rules here, I think it depends
on what you're doing, so the only real way is to try both. Note, however,
that even if your type is immutable, you can still modify the individual
elements of the Cholesky, you just can't change it to use a different
Cholesky object.
Simon