|
|||||||||||
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.VectTable
Class Name : VectTable
Project ref : SPIS project
File name : VectTable.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 vectors (i.e. 1 column).
Versions and anomalies correction :
Version number | Author (name, e-mail) | Corrections/Modifications |
0.1 | JF Roussel, roussel@onecert.fr | Creation |
Field Summary | |
protected Geom |
geom
pointer to the geometry defining the vector meaning |
protected float[][] |
val
table vector values (val[i][j] is j-th coordinate of i-th vector, table size is [length][dim]) |
protected int |
vectDim
dimension each vector |
Fields inherited from class spis.Util.Table.Table |
dim, increment |
Constructor Summary | |
protected |
VectTable(float[] value,
int tableDimension)
Constructor with constant vector value |
|
VectTable(Geom geometry,
float[][] values)
Constructor with array passed. |
|
VectTable(Geom geometry,
float[][] values,
int tableDimension,
int vectDimension)
Constructor with full data Values must be of dimension [length(at least)][dim(at least)] (checked) |
|
VectTable(Geom geometry,
int tableDimension,
int vectDimension)
Default constructor |
protected |
VectTable(VectTable t)
copy constructor for this abstract class |
Method Summary | |
void |
add(float[] vect)
Adds a constant vector to this table. |
void |
add(VectTable vt)
Adds another vectTable to this one. |
void |
addData(float[] x)
adds value x at the end of the table, of which size increases by one (data are preserved, a copy of x array is made) |
void |
checkSameDims(VectTable tab)
checks equality of array both dimensions (table dimension and vector dimension) |
void |
checkSameVectDim(float[] vect)
checks equality of vector dimension |
void |
checkSameVectDim(VectTable tab)
checks equality of vector dimension |
void |
checkVectDimIsLarger(int size)
checks equality of vector dimension (filled size, not dimensioned size) |
void |
computeScalProd(VectTable vt,
FloatScalTable scalProd)
Computes the scalar product of this table with the passed table vt |
float[] |
computeTableSum()
Returns the sum of the Table vectors. |
void |
divide(FloatScalTable fst)
Divides this table by FloatScalTable fst. |
void |
equalPolarVeloIncrement(VectTable a,
int ArId,
int AthetaId,
VectTable v,
int VrId,
int VthetaId,
VectTable x,
int rId,
int dVrId,
int dVthetaId,
float dt)
Computes the velocity increment in polar coordinates due to a given acceleration during time dt.. |
VectTable |
getCopy()
replaces the copy constructor for this abstract class (to be overriden by derived classes) |
Geom |
getGeom()
Returns the geometry these vectors are based on |
float[][] |
getValues()
Returns the table values |
int |
getVectDim()
Returns the dimension of the table vectors |
void |
linComb(float a1,
VectTable vt,
float a2)
Performs the following linear comination on this table: this = a1 this + a2 t. |
void |
mult(float coeff)
Multiplies this table by float coeff |
void |
mult(FloatScalTable fst)
Multiplies this table by FloatScalTable fst. |
void |
mult(FloatScalTable fst,
float coeff)
Multiplies this table by FloatScalTable fst and float coeff. |
void |
normalise()
normalises the vectors of this table (to length 1) |
void |
reset()
Sets this table to zero value (dimension unchanged) |
FloatScalTable |
returnNorm()
Returns the scalar table of the norms of the vectors of this table |
FloatScalTable |
returnScalProd(float[] v)
Returns the result of the scalar product of this table and the passed vector v, as a scalar table |
FloatScalTable |
returnScalProd(VectTable vt)
Returns the result of the scalar product of this table with the passed table vt, as a scalar table |
void |
set(float[] value)
Sets table value (uniform) |
void |
set(VectTable inTable)
Copies the values of the passed table onto this table (same dimensions 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 |
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 |
setMult(VectTable tab,
float coeff)
Sets this table to tab x coeff (array dimensions must be identical, this is checked) |
void |
setMult(VectTable tab,
float coeff,
int start,
int end)
Sets this table to tab x coeff, but for vector coordinate index "start" to "end" only (array dimensions must be sufficient, this is checked) |
void |
substract(VectTable vt)
Substracts another vectTable from this one. |
void |
vectProd(VectTable vt)
Computes the vector product: this = this x vt. |
Methods inherited from class spis.Util.Table.Table |
checkSameDim, declareDim, getDim |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected float[][] val
protected int vectDim
protected Geom geom
Constructor Detail |
public VectTable(Geom geometry, int tableDimension, int vectDimension)
public VectTable(Geom geometry, float[][] values)
public VectTable(Geom geometry, float[][] values, int tableDimension, int vectDimension)
protected VectTable(VectTable t)
protected VectTable(float[] value, int tableDimension)
value
- of the constant vector (its length determines the vector dimension)tableDimension
- Method Detail |
public VectTable getCopy()
public void mult(float coeff)
public void mult(FloatScalTable fst, float coeff)
public void mult(FloatScalTable fst)
public void divide(FloatScalTable fst)
public void add(VectTable vt)
public void add(float[] vect)
public void substract(VectTable vt)
public void linComb(float a1, VectTable vt, float a2)
public void vectProd(VectTable vt)
public FloatScalTable returnScalProd(VectTable vt)
public FloatScalTable returnScalProd(float[] v)
public FloatScalTable returnNorm()
public void computeScalProd(VectTable vt, FloatScalTable scalProd)
vt
- other table to compute the scalar product againscalProd
- the resultpublic void setMult(VectTable tab, float coeff)
public void setMult(VectTable tab, float coeff, int start, int end)
public void normalise()
public void equalPolarVeloIncrement(VectTable a, int ArId, int AthetaId, VectTable v, int VrId, int VthetaId, VectTable x, int rId, int dVrId, int dVthetaId, float dt)
public void checkSameDims(VectTable tab)
public void checkVectDimIsLarger(int size)
public void checkSameVectDim(VectTable tab)
public void checkSameVectDim(float[] vect)
public float[] computeTableSum()
public void addData(float[] x)
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 set(float[] value)
public void set(VectTable inTable)
public void reset()
reset
in class Table
public float[][] getValues()
public int getVectDim()
public Geom getGeom()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |