public class Utils
extends java.lang.Object
Assorted methods to manage several topics
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static float |
Assigned(float val,
float tope)
Rounds the generated value for the semantics when necesary
|
static boolean |
BETTER(double X,
double Y)
Returns if the first double argument is better than the second
|
static boolean |
BETTER(float X,
float Y)
Returns if the first float argument is better than the second
|
static boolean |
BETTER(int X,
int Y)
Returns if the first integer argument is better than the second
|
static int |
ExamplesClass(int num_class)
Counts the number of examples of the DataSet belonging to the number of the class indicated
|
static int |
getPosString(java.util.Vector vect_valores,
java.lang.String value)
Returns the position of the element at the vector, -1 if does not appear
|
static float |
Maximum(float x,
float y)
Returns the maximum of two float values
|
static float |
Minimum(float x,
float y)
Returns the minimum of two float values
|
static void |
OrCrecIndex(float[] v,
int left,
int right,
int[] index)
C.A.R, Hoare Quick sort.
|
static void |
OrDecIndex(float[] v,
int left,
int right,
int[] index)
C.A.R, Hoare Quick sort.
|
public static int getPosString(java.util.Vector vect_valores,
java.lang.String value)
Returns the position of the element at the vector, -1 if does not appear
vect_valores - Vector with valuesvalue - The value to searchpublic static float Minimum(float x,
float y)
Returns the minimum of two float values
x - Some floaty - Some floatpublic static float Maximum(float x,
float y)
Returns the maximum of two float values
x - Some floaty - Some floatpublic static boolean BETTER(float X,
float Y)
Returns if the first float argument is better than the second
X - Some floatY - Some floatpublic static boolean BETTER(int X,
int Y)
Returns if the first integer argument is better than the second
X - Some integerY - Some integerpublic static boolean BETTER(double X,
double Y)
Returns if the first double argument is better than the second
X - Some doubleY - Some doublepublic static void OrDecIndex(float[] v,
int left,
int right,
int[] index)
C.A.R, Hoare Quick sort. Based on sort by interchange. Decreasing sort.
v - Vector to be sortedleft - Position to sortright - Final position to sortindex - The indexes of the original vectorpublic static void OrCrecIndex(float[] v,
int left,
int right,
int[] index)
C.A.R, Hoare Quick sort. Based on sort by interchange. Incresing sort.
v - Vector to be sortedleft - Initial position to sortright - Final position to sortindex - The indexes of the original vectorpublic static float Assigned(float val,
float tope)
Rounds the generated value for the semantics when necesary
val - The value to roundtope - public static int ExamplesClass(int num_class)
Counts the number of examples of the DataSet belonging to the number of the class indicated
num_class - The number of the objective class