Hi All,
I need some clarifications about subclassing AbstractArray to create a 
multi-dimensional array with unspecified number of dimensions.

I've created an (useless) example defining a simple container (attached) to 
clarify me necessary step and function to implement, and then my doubts:

   - for Julia 0.4.x a chapter *Interface* 
   <http://docs.julialang.org/en/release-0.4/manual/interfaces/>states that 
   minimal function that I MUST create are size(), getindex(), setindex!(), 
   but in my case I MUST create another form of getindex(), setindex!() 
   listed between optional methods
   - for Julia 0.3.x previous chapter doesn't exists, then I don't have a 
   clear guideline to implement my type
   - running attached example (in Julia 0.3.11 64bit under Win7 64bit), 
   other function are required to show objects in REPL (some also undocumented 
   like print_matrix() ), otherwise creation of an object (e.g. with 
   command a = MyArr(3)) fails
   
Than, what's correct way to subclass AbstractArray for my needs 
(multidimensional array)? 


Many thanks in advance for anyone can indicate me right direction


Leonardo


Attachment: test.jl
Description: Binary data

Reply via email to