org.spaceroots.mantissa.functions.scalar
Class ScalarValuedPair
- java.lang.Object
-
- org.spaceroots.mantissa.functions.scalar.ScalarValuedPair
-
- All Implemented Interfaces:
- java.io.Serializable
public class ScalarValuedPair extends java.lang.Object implements java.io.SerializableThis class represents an (x, f(x)) pair for scalar functions.A scalar function is a function of one scalar parameter x whose value is a scalar. This class is used has a simple placeholder to contain both an abscissa and the value of the function at this abscissa.
- See Also:
SampledFunction,VectorialValuedPair, Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description ScalarValuedPair(double x, double y)Simple constructor.ScalarValuedPair(ScalarValuedPair p)Copy-constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublegetX()Getter for the abscissa.doublegetY()Getter for the ordinate.voidsetX(double x)Setter for the abscissa.voidsetY(double y)Setter for the ordinate.
-
-
-
Constructor Detail
-
ScalarValuedPair
public ScalarValuedPair(double x, double y)Simple constructor. Build an instance from its coordinates- Parameters:
x- abscissay- ordinate (value of the function)
-
ScalarValuedPair
public ScalarValuedPair(ScalarValuedPair p)
Copy-constructor.- Parameters:
p- point to copy
-
-
Method Detail
-
getX
public double getX()
Getter for the abscissa.- Returns:
- value of the abscissa
-
getY
public double getY()
Getter for the ordinate.- Returns:
- value of the ordinate
-
setX
public void setX(double x)
Setter for the abscissa.- Parameters:
x- new value for the abscissa
-
setY
public void setY(double y)
Setter for the ordinate.- Parameters:
y- new value for the ordinate
-
-
DataMelt 3.0 © DataMelt by jWork.ORG