|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjopt.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 NumSetpublic void clear()
clear in interface NumSetclear in class DoubleSetpublic 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 DoubleSetpublic double getMin(int intervalIdx)
public double getMax()
getMax in class DoubleSetpublic double getMax(int intervalIdx)
public boolean contains(double val)
contains in class DoubleSetpublic void add(double val)
add in class DoubleSet
public void add(double start,
double end)
add in class DoubleSetpublic void remove(double val)
remove in class DoubleSet
public void remove(double start,
double end)
remove in class DoubleSetpublic final void removeStartingAfter(double val)
removeStartingAfter in class DoubleSetpublic final void removeEndingBefore(double val)
removeEndingBefore in class DoubleSetpublic void removeStartingFrom(double val)
removeStartingFrom in class DoubleSetpublic void removeEndingAt(double val)
removeEndingAt in class DoubleSetpublic double getNextHigher(double val)
getNextHigher in class DoubleSetpublic double getNextLower(double val)
getNextLower in class DoubleSetpublic IntervalIterator intervals()
IntervalSet
intervals in interface IntervalSetpublic NumberIterator values()
NumSet
values in interface NumSetpublic java.lang.Object clone()
clone in interface NumSetclone 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 | ||||||||||