public abstract class BaseCurve extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_FORMAT_PREC |
Constructor and Description |
---|
BaseCurve() |
Modifier and Type | Method and Description |
---|---|
protected double |
calculateArea() |
protected double |
calculateArea(double[] x,
double[] y) |
protected String |
format(double d,
int precision) |
static <T extends BaseCurve> |
fromJson(String json,
Class<T> curveClass) |
static <T extends BaseCurve> |
fromYaml(String yaml,
Class<T> curveClass) |
abstract String |
getTitle() |
abstract double[] |
getX() |
abstract double[] |
getY() |
abstract int |
numPoints() |
String |
toJson() |
String |
toYaml() |
public static final int DEFAULT_FORMAT_PREC
public abstract int numPoints()
public abstract double[] getX()
public abstract double[] getY()
public abstract String getTitle()
protected double calculateArea()
protected double calculateArea(double[] x, double[] y)
protected String format(double d, int precision)
public String toJson()
public String toYaml()
public static <T extends BaseCurve> T fromJson(String json, Class<T> curveClass)
T
- Typejson
- JSON representationcurveClass
- Class for the curveCopyright © 2017. All rights reserved.