예제 #1
0
  /**
   * Whether there is an Edition there which can be successfully converted into a zero based
   * Sequence
   */
  public static boolean checkSubSequence(FeEdition edition, Position key, boolean required) {
    FeRangeElement value;
    Ravi.hack();
    /* zones */
    value = edition.fetch(key);
    if (value == null) {
      return !required;
    }
    return (value instanceof FeEdition)
        && ((((FeEdition) value).coordinateSpace().isEqual(IntegerSpace.make()))
            && (((IntegerRegion) ((FeEdition) value).domain()).isCompacted()
            /* and: [((value cast: FeEdition) zoneOf: PrimSpec uInt8) domain
            isEqual: (value cast: FeEdition) domain] */
            ));
    /*
    udanax-top.st:23649:FeWrapper class methodsFor: 'protected: checking'!
    {BooleanVar} checkSubSequence: edition {FeEdition} with: key {Position} with: required {BooleanVar}
    	"Whether there is an Edition there which can be successfully converted into a zero based Sequence"

    	| value {FeRangeElement} |
    	Ravi hack. "zones"
    	value := edition fetch: key.
    	value == NULL ifTrue: [^required not].
    	^(value isKindOf: FeEdition)
    		and: [((value cast: FeEdition) coordinateSpace isEqual: IntegerSpace make)
    		and: [((value cast: FeEdition) domain cast: IntegerRegion) isCompacted
    		"and: [((value cast: FeEdition) zoneOf: PrimSpec uInt8) domain
    			isEqual: (value cast: FeEdition) domain]"]]!
    */
  }
예제 #2
0
 public CoordinateSpace coordinateSpace() {
   return IntegerSpace.make();
   /*
   udanax-top.st:49601:OberIntegerTable methodsFor: 'accessing'!
   {CoordinateSpace} coordinateSpace
   	^IntegerSpace make!
   */
 }
예제 #3
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]!
    */
  }
예제 #4
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]!
    */
  }