|
SSJ
3.3.1
Stochastic Simulation in Java
|
Implementation of CoordinateSet using a long bit-mask internal representation.
More...
Public Member Functions | |
| CoordinateSetLong (long mask) | |
Constructs a coordinate set with corresponding bit mask mask. | |
| long | getMask () |
| Returns the bit-mask representation of the current coordinate set. | |
| boolean | equals (Object o) |
| List< Integer > | asList () |
| boolean | contains (int coord) |
| boolean | containsAll (CoordinateSet cs) |
| int | cardinality () |
| int | maxCoordinate () |
| Returns the maximum coordinate index, starting at 0 for the first coordinate. | |
| List< CoordinateSet > | subsets (boolean includeEmptySet, int maxOrder) |
Returns all subsets of the current coordinate set, whose cardinality is at most maxOrder. More... | |
Public Member Functions inherited from CoordinateSet | |
| abstract List< Integer > | asList () |
| abstract int | maxCoordinate () |
| Returns the maximum coordinate index, starting at 0 for the first coordinate. | |
| abstract List< CoordinateSet > | subsets (boolean includeEmptySet, int maxOrder) |
Returns all subsets of the current coordinate set, whose cardinality is at most maxOrder. | |
| boolean | equals (Object o) |
| boolean | contains (int coord) |
Returns true if the current set contains coordinate coord. More... | |
| boolean | containsAll (CoordinateSet cs) |
Returns true if the current set contains all coordinates in cs. More... | |
| int | cardinality () |
| Returns the cardinality of the current coordinate set. More... | |
| boolean | isSubset (CoordinateSet cs) |
Returns true if cs is a subset of the current coordinate set. | |
| List< CoordinateSet > | subsets () |
Returns all subsets of the current coordinate set, whose cardinality is at most maxOrder. More... | |
| List< CoordinateSet > | subsetsNotEmpty () |
Returns all subsets of the current coordinate set, whose cardinality is at most maxOrder. More... | |
| List< CoordinateSet > | subsets (int maxOrder) |
Returns all subsets of the current coordinate set, whose cardinality is at most maxOrder. More... | |
| List< CoordinateSet > | subsetsNotEmpty (int maxOrder) |
Returns all subsets of the current coordinate set, whose cardinality is at most maxOrder. More... | |
| String | toString () |
Static Public Member Functions | |
| static CoordinateSet | allCoordinates (int dimension) |
Returns a set of all coordinates in a space of dimension dimension. | |
Protected Attributes | |
| long | mask |
Implementation of CoordinateSet using a long bit-mask internal representation.
| List<CoordinateSet> subsets | ( | boolean | includeEmptySet, |
| int | maxOrder | ||
| ) |
Returns all subsets of the current coordinate set, whose cardinality is at most maxOrder.
// inefficient exhaustive enumeration long maskMin = includeEmptySet ? 0 : 1; for (long mask = maskMin; mask < maskMax; mask++) { CoordinateSet cs = new CoordinateSetLong(mask); if (cs.cardinality() <= maxOrder && containsAll(cs)) list.add(cs); }
1.8.14