Exemplo n.º 1
0
  /** A new empty MuTable whose domain space is 'cs'. */
  public static MuTable make(CoordinateSpace cs) {
    if (cs.isEqual(IntegerSpace.make())) {
      return IntegerTable.make(10);
    } else {
      return HashTable.makeCoordinateSpace(cs);
    }
    /*
    udanax-top.st:48132:MuTable class methodsFor: 'pseudo constructors'!
    {MuTable} make: cs {CoordinateSpace}
    	"A new empty MuTable whose domain space is 'cs'."

    	(cs isEqual: IntegerSpace make) ifTrue:
    		[^IntegerTable make: 10]
    	ifFalse: [^HashTable make.CoordinateSpace: cs]!
    */
  }
Exemplo n.º 2
0
  /**
   * Semantically identical to 'muTable(cs)'. 'reg' just provides a hint as to what part of the
   * domain space the new table should expect to be occupied.
   */
  public static MuTable make(CoordinateSpace cs, XnRegion reg) {
    if (cs.isEqual(IntegerSpace.make())) {
      return IntegerTable.makeRegion(((IntegerRegion) reg));
    } else {
      return HashTable.makeCoordinateSpace(cs);
    }
    /*
    udanax-top.st:48139:MuTable class methodsFor: 'pseudo constructors'!
    {MuTable} make: cs {CoordinateSpace} with: reg {XnRegion}
    	"Semantically identical to 'muTable(cs)'.  'reg' just provides a hint as to what
    	part of the domain space the new table should expect to be occupied."

    	(cs isEqual: IntegerSpace make) ifTrue:
    		[^IntegerTable make.Region: (reg cast: IntegerRegion)]
    	ifFalse: [^HashTable make.CoordinateSpace: cs]!
    */
  }