|
CDMA engine API
3.1.0
CDMA core library
|
The IRange interface describes a dimension of a IIndex. More...
Public Member Functions | |
| IRange | compose (IRange r) throws InvalidRangeException |
| IRange | compact () throws InvalidRangeException |
| IRange | shiftOrigin (int origin) throws InvalidRangeException |
| IRange | intersect (IRange r) throws InvalidRangeException |
| boolean | intersects (IRange r) |
| IRange | union (IRange r) throws InvalidRangeException |
| int | length () |
| int | element (long i) throws InvalidRangeException |
| long | index (int elem) throws InvalidRangeException |
| boolean | contains (int i) |
| long | first () |
| long | last () |
| long | stride () |
| String | getName () |
| int | getFirstInInterval (int start) |
The IRange interface describes a dimension of a IIndex.
Represents a set of integers that compound a particular dimension of a array. It defines for a that specific dimension:
Create a new Range by compacting this Range by removing the stride. first = first/stride, last=last/stride, stride=1.
| InvalidRangeException | elements must be nonnegative, 0 <= first <= last |
Create a new Range by composing a Range that is relative to this Range.
| r | range relative to base |
| InvalidRangeException | elements must be nonnegative, 0 <= first <= last |
| boolean org.gumtree.data.interfaces.IRange.contains | ( | int | i | ) |
Is the ith element contained in this Range?
| i | index in the original Range |
| int org.gumtree.data.interfaces.IRange.element | ( | long | i | ) | throws InvalidRangeException |
Get i-th element.
| i | index of the element |
| InvalidRangeException | i must be: 0 <= i < length |
| int org.gumtree.data.interfaces.IRange.getFirstInInterval | ( | int | start | ) |
Find the smallest element k in the Range, such that
| start | starting index |
| String org.gumtree.data.interfaces.IRange.getName | ( | ) |
Get name.
| long org.gumtree.data.interfaces.IRange.index | ( | int | elem | ) | throws InvalidRangeException |
Get the index for this element: inverse of element.
| elem | the element of the range |
| InvalidRangeException | if illegal element |
Create a new Range by intersecting with a Range using same interval as this Range. NOTE: intersections when both Ranges have strides are not supported.
| r | range to intersect |
| InvalidRangeException | elements must be nonnegative |
| boolean org.gumtree.data.interfaces.IRange.intersects | ( | IRange | r | ) |
Determine if a given Range intersects this one. NOTE: we dont yet support intersection when both Ranges have strides
| r | range to intersect |
Get the number of elements in the range.
| IRange org.gumtree.data.interfaces.IRange.shiftOrigin | ( | int | origin | ) | throws InvalidRangeException |
Create a new Range shifting this range by a constant factor.
| origin | subtract this from first, last |
| InvalidRangeException | elements must be nonnegative, 0 <= first <= last |
Create a new Range by making the union with a Range using same interval as this Range. NOTE: no strides.
| r | range to add |
| InvalidRangeException | elements must be nonnegative |