|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jopt.csp.util.DoubleSet jopt.csp.util.DoubleIntervalSet
A sorted set of double intervals
Constructor Summary | |
DoubleIntervalSet()
Creates a new set |
Method Summary | |
void |
add(double val)
Adds a value to set |
void |
add(double start,
double end)
Adds a range of values to set |
void |
clear()
Removes all values from the set |
java.lang.Object |
clone()
Creates a duplicate of this set |
boolean |
contains(double val)
Returns true if value is contained in set |
int |
getFirstIntervalIndex()
Returns first interval index in list |
double |
getIntervalEnd(int idx)
Returns end value for interval at a given index |
double |
getIntervalStart(int idx)
Returns start value for interval at a given index |
int |
getLastIntervalIndex()
Returns the last index in list |
DoubleIntervalSetListener |
getListener()
Returns listener that is currently assigned to set |
double |
getMax()
Returns maximum value for set. |
double |
getMax(int intervalIdx)
Returns the end of the interval at the specified index |
double |
getMin()
Returns minimum value for set. |
double |
getMin(int intervalIdx)
Returns the start of the interval at the specified index |
double |
getNextHigher(double val)
Returns the next higher value in the domain or current value if none exists |
int |
getNextIntervalIndex(int idx)
Returns next interval index in list |
double |
getNextLower(double val)
Returns the next lower value in the domain or current value if none exists |
int |
getPreviousIntervalIndex(int idx)
Returns previous interval index in list |
IntervalIterator |
intervals()
Returns an iterator for intervals contained in set |
void |
remove(double val)
Removes a value from the set |
void |
remove(double start,
double end)
Removes a range of values from the set |
void |
removeEndingAt(double val)
Removes all values below and including given value |
void |
removeEndingBefore(double val)
Removes all values below given value |
void |
removeStartingAfter(double val)
Removes all values above and including given value |
void |
removeStartingFrom(double val)
Removes all values above and including given value |
void |
setListener(DoubleIntervalSetListener listener,
int callback)
Sets listener for set to be notified of changes |
int |
size()
Returns the size of the set. |
java.lang.String |
toString()
|
NumberIterator |
values()
Returns an iterator containing all values in the set |
Methods inherited from class jopt.csp.util.DoubleSet |
addAll, removeAll, retainAll |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DoubleIntervalSet()
Method Detail |
public int size()
size
in interface NumSet
public void clear()
clear
in interface NumSet
clear
in class DoubleSet
public int getFirstIntervalIndex()
public int getLastIntervalIndex()
public int getNextIntervalIndex(int idx)
idx
- Index previous to index that is to be foundpublic int getPreviousIntervalIndex(int idx)
idx
- Index following index that is to be foundpublic double getIntervalStart(int idx)
public double getIntervalEnd(int idx)
public double getMin()
getMin
in class DoubleSet
public double getMin(int intervalIdx)
public double getMax()
getMax
in class DoubleSet
public double getMax(int intervalIdx)
public boolean contains(double val)
contains
in class DoubleSet
public void add(double val)
add
in class DoubleSet
public void add(double start, double end)
add
in class DoubleSet
public void remove(double val)
remove
in class DoubleSet
public void remove(double start, double end)
remove
in class DoubleSet
public final void removeStartingAfter(double val)
removeStartingAfter
in class DoubleSet
public final void removeEndingBefore(double val)
removeEndingBefore
in class DoubleSet
public void removeStartingFrom(double val)
removeStartingFrom
in class DoubleSet
public void removeEndingAt(double val)
removeEndingAt
in class DoubleSet
public double getNextHigher(double val)
getNextHigher
in class DoubleSet
public double getNextLower(double val)
getNextLower
in class DoubleSet
public IntervalIterator intervals()
IntervalSet
intervals
in interface IntervalSet
public NumberIterator values()
NumSet
values
in interface NumSet
public java.lang.Object clone()
clone
in interface NumSet
clone
in class DoubleSet
public void setListener(DoubleIntervalSetListener listener, int callback)
public DoubleIntervalSetListener getListener()
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |