classifier
Class Weights
java.lang.Object
|
+--classifier.Weights
- public class Weights
- extends java.lang.Object
Method Summary |
static java.lang.String |
encode(float[] weights,
int references)
Encodes number of references and weights for storage. |
static java.lang.String |
floatToString(float f,
int digits)
|
static int |
getReferences(java.lang.String codice)
|
static int |
merge(float[] weights,
int avg1,
java.lang.String codice)
merges with weight collected so far |
static void |
round(float[] weights,
float min)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Weights
public Weights()
encode
public static java.lang.String encode(float[] weights,
int references)
- Encodes number of references and weights for storage.
It should be toString() -- Beppe
floatToString
public static java.lang.String floatToString(float f,
int digits)
round
public static void round(float[] weights,
float min)
merge
public static int merge(float[] weights,
int avg1,
java.lang.String codice)
- merges with weight collected so far
- Parameters:
weights,
- array of new weightcode,
- encoding of previous weights.- Returns:
- number of combined weights
(HP: la stringa deve essere corretta. Non sono applicati meccanismi
di controllo degli errori).
getReferences
public static int getReferences(java.lang.String codice)