public final class FV extends IFV
| Constructor and Description |
|---|
FV() |
FV(DataInputStream dos)
Read a feature vector
|
FV(DataInputStream dos,
int capacity)
Read a feature vector
|
FV(FV fv1,
FV fv2) |
FV(FV fv1,
FV fv2,
boolean negSecond) |
FV(int initialCapacity) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int i) |
void |
add(int[] i) |
void |
addFeaturesToMap(IntIntHash map) |
static FV |
cat(FV f1,
FV f2) |
static FV |
cat(FV f1,
FV f2,
FV f3) |
static FV |
cat(FV f1,
FV f2,
FV f3,
FV f4) |
void |
clear() |
IFV |
clone() |
int |
createFeature(int i) |
int |
createFeature(int i,
double v) |
int |
dotProduct(FV fl2) |
FV |
getDistVector(FV 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() |
void |
put(int i,
double f) |
static FV |
read(DataInputStream dis) |
void |
readKeys(DataInputStream dos) |
void |
setIndex(int p,
int i) |
int |
size() |
String |
toString() |
void |
trimToSize()
Trims the capacity of this Graph instance to true size.
|
double |
twoNorm(FV fl2) |
void |
update(double[] parameters,
double[] total,
double alpha_k,
double upd) |
void |
update(double[] parameters,
double[] total,
double alpha_k,
double upd,
boolean negate) |
void |
update(float[] parameters,
float[] total,
double alpha_k,
double upd,
boolean negate) |
void |
update(float[] parameters,
float[] total,
double alpha_k,
double upd,
boolean negate,
float[] totalp,
Long2IntInterface li) |
void |
update(short[] parameters,
short[] total,
double alpha_k,
double upd,
boolean negate) |
void |
writeKeys(DataOutputStream dos) |
public FV()
public FV(int initialCapacity)
public FV(DataInputStream dos, int capacity) throws IOException
index - value - IOExceptionpublic FV(DataInputStream dos) throws IOException
index - value - IOExceptionpublic final int size()
public final boolean isEmpty()
public final int createFeature(int i,
double v)
public final int createFeature(int i)
public final int getIndex(int i)
public void setIndex(int p,
int i)
public void trimToSize()
public final void add(int[] i)
public final void put(int i,
double 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 void update(double[] parameters,
double[] total,
double alpha_k,
double upd)
public final void update(double[] parameters,
double[] total,
double alpha_k,
double upd,
boolean negate)
public final void update(short[] parameters,
short[] total,
double alpha_k,
double upd,
boolean negate)
public final void update(float[] parameters,
float[] total,
double alpha_k,
double upd,
boolean negate)
public final void update(float[] parameters,
float[] total,
double alpha_k,
double upd,
boolean negate,
float[] totalp,
Long2IntInterface li)
public int dotProduct(FV fl2)
public double twoNorm(FV fl2)
public void addFeaturesToMap(IntIntHash map)
public void writeKeys(DataOutputStream dos) throws IOException
IOExceptionpublic void readKeys(DataInputStream dos) throws IOException
IOExceptionpublic static final FV read(DataInputStream dis) throws IOException
IOExceptionCopyright © 2013. All rights reserved.