Class DataRange
- java.lang.Object
-
- org.apache.sysds.runtime.privacy.finegrained.DataRange
-
public class DataRange extends Object
A DataRange instance marks a part of a CacheableData data object. The beginDims marks the beginning for all dimensions and the endDims marks the end for all dimensions. DataRange is very similar to org.apache.sysds.runtime.util.IndexRange, except that DataRange supports more than two dimensions.
-
-
Constructor Summary
Constructors Constructor Description DataRange(long[] beginDims, long[] endDims)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(long[] index)
Returns true if the given index is in the data range.boolean
equals(Object other)
long[]
getBeginDims()
long[]
getEndDims()
boolean
overlaps(DataRange dataRange)
Returns true if this data range overlaps with the given data range.String
toString()
-
-
-
Method Detail
-
getBeginDims
public long[] getBeginDims()
-
getEndDims
public long[] getEndDims()
-
overlaps
public boolean overlaps(DataRange dataRange)
Returns true if this data range overlaps with the given data range. An overlap means that the data ranges have some overlap in all dimension.- Parameters:
dataRange
- for which the overlap is checked- Returns:
- true if the data ranges overlap or false if not
-
contains
public boolean contains(long[] index)
Returns true if the given index is in the data range. Being in the data range means that the index has to be in the range for all dimensions.- Parameters:
index
- of an element for which it is checked if it is in the range- Returns:
- true if the index is in the range and false otherwise
-
-