igeo
Class IUPiecewiseLinearMap
java.lang.Object
igeo.IMap
igeo.IUPiecewiseLinearMap
public class IUPiecewiseLinearMap
- extends IMap
A subclass of IMap defined by multiple u domain and multiple values.
A value on the map is calculated by interpolation of assigned values.
Field Summary |
java.util.ArrayList<java.lang.Double> |
domains
|
java.util.ArrayList<java.lang.Double> |
values
|
Method Summary |
void |
addValue(double domain,
double value)
this needs to be called in order of domain |
void |
flipU()
to be defined in sub class |
double |
get(double x)
|
double |
get(double u,
double v)
A main method to get a value of the map. |
Methods inherited from class igeo.IMap |
createImage, flipV, get, initDensityMapU, initDensityMapU, initDensityMapV, initDensityMapV, matchUDensityWithMap, matchUDensityWithMap, matchVDensityWithMap, matchVDensityWithMap, project, projectU, projectV, scaleDensityMapU, scaleDensityMapV |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
domains
public java.util.ArrayList<java.lang.Double> domains
values
public java.util.ArrayList<java.lang.Double> values
IUPiecewiseLinearMap
public IUPiecewiseLinearMap()
addValue
public void addValue(double domain,
double value)
- this needs to be called in order of domain
- Parameters:
domain
- [0,1]
get
public double get(double u,
double v)
- Description copied from class:
IMap
- A main method to get a value of the map.
This method should be overwritten by child classes to have preferable behavior
returning value of the map ranging 0.0 - 1.0.
- Overrides:
get
in class IMap
- Parameters:
u
- u coordinates ranges 0.0 - 1.0v
- v coordinates ranges 0.0 - 1.0
- Returns:
- value of the map.
get
public double get(double x)
flipU
public void flipU()
- Description copied from class:
IMap
- to be defined in sub class
- Overrides:
flipU
in class IMap