public class vectordouble
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static double |
MISSING
Encodes a vector of double values
|
Modifier and Type | Method and Description |
---|---|
void |
Append(double x)
Add the "x" value to the vector
|
double |
At(int pos)
Returns the value in the position "pos" of the vector (or -99999999 if the position is not valid)
|
double |
Average()
Returns the average value for all the values in the vector (or position -999999999 if the vector is empty)
|
double[] |
Convert(java.lang.Integer tamano)
Returns a new vector containing the first "tamano" elements of the vector
|
int |
find(double x)
Returns the position in the vector for a value "x" or -1 if the value is not found in the vector
|
double |
Max()
Returns the maximum value of the vector
|
double |
Min()
Returns the minimum value of the vector
|
int |
PosMax()
Returns the position in the vector for maximum value of the vector
|
int |
PosMin()
Returns the position in the vector for minimum value of the vector
|
void |
PrintDefinition()
Prints in the standard output the vector
|
void |
Put(double[] x,
int tamano)
Set the values of the first "tamano" elements of the vector to the values in vector "x"
|
void |
Put(double x,
int pos)
Set the value to the vector in position "pos" to the value "x" (overwritting the previous value)
|
void |
Realloc()
Increases the memory for the vector to the double
|
void |
Sort()
Sorts the values in the vector (in ascending order)
|
public static final double MISSING
Encodes a vector of double values
public void Realloc()
Increases the memory for the vector to the double
public void Append(double x)
Add the "x" value to the vector
x
- double The value to be added to the vectorpublic void Put(double x, int pos)
Set the value to the vector in position "pos" to the value "x" (overwritting the previous value)
x
- double The new valuepos
- int The position in the vectorpublic void Put(double[] x, int tamano)
Set the values of the first "tamano" elements of the vector to the values in vector "x"
x
- double[] The new valuestamano
- int The last position in the vectorpublic double[] Convert(java.lang.Integer tamano)
Returns a new vector containing the first "tamano" elements of the vector
tamano
- Integer The last position in the vectorpublic double At(int pos)
Returns the value in the position "pos" of the vector (or -99999999 if the position is not valid)
pos
- int The position in the vectorpublic void PrintDefinition()
Prints in the standard output the vector
public double Max()
Returns the maximum value of the vector
public double Min()
Returns the minimum value of the vector
public int find(double x)
Returns the position in the vector for a value "x" or -1 if the value is not found in the vector
x
- double The value to be foundpublic int PosMax()
Returns the position in the vector for maximum value of the vector
public int PosMin()
Returns the position in the vector for minimum value of the vector
public double Average()
Returns the average value for all the values in the vector (or position -999999999 if the vector is empty)
public void Sort()
Sorts the values in the vector (in ascending order)