|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjhplot.PND
public class PND
A container to hold data points in many dimensions. All numbers are expected to be in double precision. It extends ArrayList and adds many new features for data manipulation. The class does not have graphical option (use H1D to show the data or methods of this class which transform P0D to a H1D histogram).
Constructor Summary | |
---|---|
PND()
Construct an empty container with no title |
|
PND(java.lang.String title)
Construct an empty container with a title |
|
PND(java.lang.String title,
java.lang.String file)
Construct a container with a title from external file (see the method toFile() how to write such ASCII file) |
Method Summary | |
---|---|
void |
add(double[] values)
Adds (appends) the specified element to the end of this list. |
void |
add(P0D values)
Adds (appends) P0D to the end of this list. |
void |
clear()
Clear the container |
PND |
copy(java.lang.String newtitle)
|
double[] |
get(int row)
Return a specific row as array |
double |
get(int row,
int column)
Return a specific value. |
double[][] |
getArray()
Get a double array with values. |
java.util.ArrayList<double[]> |
getArrayList()
Get data in form of ArrayList |
P0D |
getColumn(int column)
Return a specific row as array |
int |
getDimension()
Get last dimension of the data. |
P0D |
getRow(int row)
Return a specific row as array |
java.lang.String |
getTitle()
Get a new title |
static void |
main(java.lang.String[] args)
Test |
void |
print()
Print PND to System.out. |
PND |
read(java.lang.String sfile)
Read the data from external file. |
PND |
remove(int index)
Remove a row |
void |
set(int index,
double[] values)
Sets (replace) the specified element. |
void |
set(int index,
P0D values)
Sets (replace) the specified element with P0D. |
PND |
setArray(double[][] values)
Set values from double array Old content will be lost. |
void |
setArrayList(java.util.ArrayList<double[]> array)
Set the data in form of ArrayList |
void |
setTitle(java.lang.String title)
Set a new title |
int |
size()
Data size (number of rows) |
void |
toFile(java.lang.String name)
Write a PND to an external file. |
java.lang.String |
toString()
Get a string representing PND |
void |
write(java.lang.String name)
Write a PND to an external file. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PND(java.lang.String title)
title
- A titlepublic PND(java.lang.String title, java.lang.String file)
title
- A titlefile
- input file namepublic PND()
Method Detail |
---|
public void setTitle(java.lang.String title)
title
- New Titlepublic java.lang.String getTitle()
public void clear()
public double[] get(int row)
row
- index of the row
public double get(int row, int column)
row
- row indexcolumn
- column index
public java.lang.String toString()
toString
in class java.lang.Object
public void print()
public P0D getColumn(int column)
column
- index of the row
public int getDimension()
public P0D getRow(int row)
row
- index of the row
public java.util.ArrayList<double[]> getArrayList()
public void add(double[] values)
values
- array of values to be added.public void add(P0D values)
values
- array of values to be added.public void set(int index, double[] values)
index
- position indexvalues
- array of values to be added.public void set(int index, P0D values)
index
- position indexvalues
- array of values to be added.public PND read(java.lang.String sfile)
sfile
- File name with input
public void write(java.lang.String name)
name
- File name with outputpublic void toFile(java.lang.String name)
name
- File name with outputpublic PND remove(int index)
index
- row index to be removedpublic int size()
public PND copy(java.lang.String newtitle)
public void setArrayList(java.util.ArrayList<double[]> array)
array
- ArrayList to be set.public double[][] getArray()
public PND setArray(double[][] values)
values
- array to be set: [ROWS][dimension];
public static void main(java.lang.String[] args)
args
-
|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |