|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectspis.Util.Table.Table
spis.Util.Table.ScalTable
spis.Util.Table.FloatScalTable
Class Name : FloatScalTable
Project ref : SPIS project
File name : FloatScalTable.java
File type : class
Copyright : ONERA, 2 Av. E. Belin, 31055 Toulouse cedex, France
http://www.onecert.fr
Status : under development
Creation : 25/08/2003
Modification :
Description : Table of float scalars (i.e. 1 column).
Versions and anomalies correction :
Version number | Author (name, e-mail) | Corrections/Modifications |
0.1 | JF Roussel, roussel@onecert.fr | Creation |
Constructor Summary | |
FloatScalTable()
Default constructor |
|
FloatScalTable(float[] values)
Constructor with data |
|
FloatScalTable(float[] values,
int tableDimension)
Constructor with full data Values must be at least of dimension [length] (checked) |
|
FloatScalTable(float x,
int tableDimension)
Constructor of a constant table with value x and dimension tableDimension |
|
FloatScalTable(FloatScalTable t)
Copy constructor (the new table is dimensioned to its useful size, it can be a way to reduce the dimension of a table to what is useful) |
|
FloatScalTable(int dim)
Basic constructor: logical dimension dim |
Method Summary | |
void |
add(FloatScalTable t)
Increments the current table by the passed table. |
void |
addData(float x)
adds value x at the end of the table, of which size increase by one (data are preserved) |
void |
applyFunc(ScalFunctionOfScal f)
Applies a function to this table (on the spot) |
float |
computeTableAverage()
Returns the average of the Table values. |
float |
computeTableL2Norm()
Returns the L2 norm of the Table: sqrt(sum values^2). |
float |
computeTableLInfNorm()
Returns the L-infinity norm of the Table: max(abs(val[i]). |
float |
computeTableQuadraticAverage()
Returns the table quadratic average: sqrt((sum values^2) / numberOfValues). |
float |
computeTableSum()
Returns the sum of the Table values. |
void |
concat(float[] f)
concatenates this table with the passed array |
void |
concat(float[] f,
int length)
concatenates this table with the first 'length' values of the passed array (f[0:length-1]) |
void |
concat(FloatScalTable t)
concatenates this table with the passed table |
void |
divide(FloatScalTable table)
Divides this table by another table (on the spot) |
void |
equalFunc(ScalFunctionOfScal f,
FloatScalTable x)
Applies a function to the argument table and affects the result to this table. |
float |
getEl(int n)
|
float[] |
getValues()
Returns the table values |
void |
linComb(float a1,
FloatScalTable t,
float a2)
Performs the following linear comination on this table: this = a1 this + a2 t. |
void |
mult(float factor)
Multiplies this table by a scalar (on the spot) |
void |
mult(FloatScalTable table)
Multiplies this table by another table (on the spot) |
void |
mult(FloatScalTable table,
float factor)
Multiplies this table by another table and a scalar (on the spot) |
void |
print()
|
void |
randomize(float max)
Fills the table with random numbers between 0 and max |
void |
reset()
Sets this table to zero value (dimension unchanged) |
FloatScalTable |
returnAdd(FloatScalTable t)
Adds the current table and the passed table and returns the sum as a new table. |
FloatScalTable |
returnDivide(FloatScalTable table)
Divides this table by another table and returns the result as a new table |
FloatScalTable |
returnLinComb(float a1,
FloatScalTable t,
float a2)
Returns the following linear comination as a new table: a1 this + a2 t. |
FloatScalTable |
returnMult(float factor)
Multiplies this table by a scalar and returns the result as a new table |
FloatScalTable |
returnMult(FloatScalTable table)
Multiplies this table by another table and returns the result as a new table |
FloatScalTable |
returnMult(FloatScalTable table,
float factor)
Multiplies this table by another table and returns the result as a new table |
FloatScalTable |
returnSubstract(FloatScalTable t)
Substract the passed table from the current table and returns the result as a new table. |
void |
set(float value)
Sets table value (uniform) |
void |
set(float value,
int dim)
|
void |
set(FloatScalTable inTable)
Copies the values of the passed table onto this table (same dimension requested and checked) |
void |
set(FloatScalTable inTable1,
FloatScalTable inTable2,
float x3,
ScalFunctionOf3Scal f)
Applies a function to 3 arguments (2 tables and 1 float) and affects the result to this table (same dimension requested and checked) |
void |
set(FloatScalTable inTable1,
FloatScalTable inTable2,
FloatScalTable inTable3,
float x4,
ScalFunctionOf4Scal f)
Applies a function to 4 arguments (3 tables and 1 float) and affects the result to this table (same dimension requested and checked) |
void |
set(FloatScalTable inTable1,
FloatScalTable inTable2,
FloatScalTable inTable3,
FloatScalTable inTable4,
float x5,
ScalFunctionOf5Scal f)
Applies a function to 5 arguments (4 tables and 1 float) and affects the result to this table (same dimension requested and checked) |
void |
set(FloatScalTable inTable1,
FloatScalTable inTable2,
ScalFunctionOf2Scal f)
Applies a function to 2 tables and affects the result to this table (same dimension requested and checked) |
void |
set(FloatScalTable inTable,
ScalFunctionOfScal f)
Applies a function to a table affects the rusult to this table (same dimension requested and checked) |
void |
setDim(int dim)
Sets logical dimension to dim and resizes the table if necessary to be large enough (does not preserve data (except if no resizing is needed)) |
void |
setDimPreserve(int dim)
Sets logical dimension to dim and resizes the table if necessary to be large enough, preserving the data |
void |
setEl(int n,
float v)
|
void |
setLengthPreserve(int length)
Sets allocated array length at least to length, preserving the data (used to force a large resizing of table instead of numerous small resizings when the total needed space can be computed) |
void |
substract(float scalValue)
Decrement this table by a scalar (on the spot) |
void |
substract(FloatScalTable table)
Decrement this table by another table (on the spot) |
Methods inherited from class spis.Util.Table.Table |
checkSameDim, declareDim, getDim |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FloatScalTable()
public FloatScalTable(int dim)
public FloatScalTable(float[] values)
public FloatScalTable(float[] values, int tableDimension)
public FloatScalTable(float x, int tableDimension)
public FloatScalTable(FloatScalTable t)
Method Detail |
public void mult(FloatScalTable table, float factor)
public void mult(FloatScalTable table)
public void mult(float factor)
public FloatScalTable returnMult(FloatScalTable table)
public FloatScalTable returnMult(float factor)
public FloatScalTable returnMult(FloatScalTable table, float factor)
public void divide(FloatScalTable table)
public FloatScalTable returnDivide(FloatScalTable table)
public void add(FloatScalTable t)
public FloatScalTable returnAdd(FloatScalTable t)
public void substract(FloatScalTable table)
public void substract(float scalValue)
public FloatScalTable returnSubstract(FloatScalTable t)
public void linComb(float a1, FloatScalTable t, float a2)
public FloatScalTable returnLinComb(float a1, FloatScalTable t, float a2)
public void applyFunc(ScalFunctionOfScal f)
public void equalFunc(ScalFunctionOfScal f, FloatScalTable x)
public float computeTableL2Norm()
public float computeTableLInfNorm()
public float computeTableSum()
public float computeTableAverage()
public float computeTableQuadraticAverage()
public void concat(FloatScalTable t)
public void concat(float[] f, int length)
public void concat(float[] f)
public void addData(float x)
public float[] getValues()
public void setDim(int dim)
setDim
in class Table
public void setDimPreserve(int dim)
setDimPreserve
in class Table
public void setLengthPreserve(int length)
public void reset()
reset
in class Table
public void set(float value, int dim)
public void set(float value)
public void set(FloatScalTable inTable)
public void set(FloatScalTable inTable, ScalFunctionOfScal f)
inTable
- the argument valuesf
- the function to apply on inTable valuespublic void set(FloatScalTable inTable1, FloatScalTable inTable2, ScalFunctionOf2Scal f)
inTable1
- the 1st argument valuesinTable2
- the 2nd argument valuesf
- the function to apply on inTable valuespublic void set(FloatScalTable inTable1, FloatScalTable inTable2, FloatScalTable inTable3, FloatScalTable inTable4, float x5, ScalFunctionOf5Scal f)
inTable1
- the 1st argument valuesinTable2
- the 2nd argument valuesinTable3
- the 3rd argument valuesinTable4
- the 4th argument valuesx5
- the (constant) last argumentf
- the function to apply on inTable valuespublic void set(FloatScalTable inTable1, FloatScalTable inTable2, FloatScalTable inTable3, float x4, ScalFunctionOf4Scal f)
inTable1
- the 1st argument valuesinTable2
- the 2nd argument valuesinTable3
- the 3rd argument valuesx4
- the (constant) last argumentf
- the function to apply on inTable valuespublic void set(FloatScalTable inTable1, FloatScalTable inTable2, float x3, ScalFunctionOf3Scal f)
inTable1
- the 1st argument valuesinTable2
- the 2nd argument valuesx3
- the (constant) last argumentf
- the function to apply on inTable valuespublic void setEl(int n, float v)
public float getEl(int n)
public void print()
public void randomize(float max)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |