From: Nameet on 22 Jul 2010 18:02 When creating a subclass that is a distributed matrix with additional attributes, I ran into the following error when subclassing distributed : ??? When constructing an instance of class 'DataContainer', the constructor must preserve the class of the returned object. Error in ==> distributed.distributed>distributed.distributed at 132 obj = distributed.pScatter( varargin{1} ); Error in ==> DataContainer.DataContainer>DataContainer.DataContainer at 21 D = D(a)distributed(data) But when I use codistributed there are no errors.. does anyone know what it is about distributed thats different and causing this? And also if there is a special way to subclass distributed then?
From: Edric M Ellis on 23 Jul 2010 03:58 "Nameet " <nk_silver(a)hotmail.dot.com> writes: > When creating a subclass that is a distributed matrix with additional > attributes, I ran into the following error when subclassing > distributed : > > ??? When constructing an instance of class 'DataContainer', the > constructor must preserve the class of the returned object. > > Error in ==> distributed.distributed>distributed.distributed at 132 > obj = distributed.pScatter( varargin{1} ); > > Error in ==> DataContainer.DataContainer>DataContainer.DataContainer at 21 > D = D(a)distributed(data) > > > But when I use codistributed there are no errors.. does anyone know > what it is about distributed thats different and causing this? And > also if there is a special way to subclass distributed then? We didn't really design the distributed or codistributed types for extension, so it does not really surprise me that you are getting failures like this. Unfortunately, "distributed" construction in particular is somewhat tricky because of the requirement to retain the connection with the corresponding codistributed array. May I ask: what sort of things are you adding to (co)distributed? Cheers, Edric.
From: Nameet on 23 Jul 2010 18:34 Edric M Ellis <eellis(a)mathworks.com> wrote in message <ytwwrsmsk7v.fsf(a)uk-eellis-deb5-64.mathworks.co.uk>... > "Nameet " <nk_silver(a)hotmail.dot.com> writes: > > > When creating a subclass that is a distributed matrix with additional > > attributes, I ran into the following error when subclassing > > distributed : > > > > ??? When constructing an instance of class 'DataContainer', the > > constructor must preserve the class of the returned object. > > > > Error in ==> distributed.distributed>distributed.distributed at 132 > > obj = distributed.pScatter( varargin{1} ); > > > > Error in ==> DataContainer.DataContainer>DataContainer.DataContainer at 21 > > D = D(a)distributed(data) > > > > > > But when I use codistributed there are no errors.. does anyone know > > what it is about distributed thats different and causing this? And > > also if there is a special way to subclass distributed then? > > We didn't really design the distributed or codistributed types for > extension, so it does not really surprise me that you are getting > failures like this. Unfortunately, "distributed" construction in > particular is somewhat tricky because of the requirement to retain the > connection with the corresponding codistributed array. > > May I ask: what sort of things are you adding to (co)distributed? > > Cheers, > > Edric. I'm trying to add methods to matricize and permute the dimensions of a (co)distributed ND-array, and add attributes to keep track of the shape and original dimensions of the array. Not being able to use the distributed constructor would be a major setback since I'll be working with large matrices. What would you suggest doing? I don't think the codistributed constructor will be of much help. Is there a round about way to create the object? Thanks, Nameet
|
Pages: 1 Prev: Gauss to Matlab Next: Peculiar system command problem on UNIX |