public final class FVR extends IFV
| Constructor and Description |
|---|
FVR() |
FVR(DataInputStream dos)
Read a feature vector
|
FVR(DataInputStream dos,
int capacity)
Read a feature vector
|
FVR(FVR fv1,
FVR fv2,
boolean negSecond) |
FVR(int initialCapacity) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int i) |
void |
add(int i,
float f) |
void |
clear() |
IFV |
clone() |
int |
createFeature(int i,
float v) |
int |
dotProduct(FVR fl2) |
FVR |
getDistVector(FVR fl2) |
int |
getIndex(int i) |
double |
getScore() |
double |
getScore(double[] parameters,
boolean negate) |
float |
getScore(float[] parameters,
boolean negate) |
int |
getScore(short[] parameters,
boolean negate) |
boolean |
isEmpty() |
static FVR |
read(DataInputStream dis) |
void |
setIndex(int p,
int i) |
int |
size() |
String |
toString() |
void |
trimToSize()
Trims the capacity of this Graph instance to true size.
|
void |
update(float[] parameters,
float[] total,
double alpha_k,
double upd,
boolean negate) |
void |
writeKeys(DataOutputStream dos) |
public FVR()
public FVR(int initialCapacity)
public FVR(DataInputStream dos, int capacity) throws IOException
index - value - IOExceptionpublic FVR(DataInputStream dos) throws IOException
index - value - IOExceptionpublic final int size()
public final boolean isEmpty()
public final int createFeature(int i,
float v)
public final int getIndex(int i)
public void setIndex(int p,
int i)
public void trimToSize()
public final void add(int i,
float f)
public double getScore(double[] parameters,
boolean negate)
public final float getScore(float[] parameters,
boolean negate)
public final int getScore(short[] parameters,
boolean negate)
public final void update(float[] parameters,
float[] total,
double alpha_k,
double upd,
boolean negate)
public int dotProduct(FVR fl2)
public void writeKeys(DataOutputStream dos) throws IOException
IOExceptionpublic static final FVR read(DataInputStream dis) throws IOException
IOExceptionCopyright © 2013. All rights reserved.