public class Vec extends Object implements Serializable, Cloneable
| Constructor and Description |
|---|
Vec() |
Vec(double[] v) |
Vec(int dimension) |
Vec(int dimension,
Map<Integer,Double> data) |
| Modifier and Type | Method and Description |
|---|---|
Vec |
add(Vec rhs) |
Object |
clone() |
void |
copy(Vec rhs) |
boolean |
equals(Object rhs) |
double |
get(int i) |
HashMap<Integer,Double> |
getData() |
double |
getDefaultValue() |
int |
getDimension() |
int |
getId() |
IndexValue |
indexWithMaxValue() |
IndexValue |
indexWithMaxValue(Set<Integer> indices) |
boolean |
isZero() |
Vec |
minus(Vec rhs) |
Vec |
multiply(double rhs) |
double |
multiply(Vec rhs) |
double |
norm(int level) |
Vec |
normalize() |
Vec |
pow(double scalar) |
Vec |
projectAlong(Vec rhs) |
Vec |
projectOrthogonal(Iterable<Vec> vlist) |
Vec |
projectOrthogonal(List<Vec> vlist,
Map<Integer,Double> alpha) |
void |
set(int i,
double value) |
void |
setAll(double value) |
void |
setId(int id) |
double |
sum() |
public void copy(Vec rhs)
public void set(int i,
double value)
public int getId()
public void setId(int id)
public double get(int i)
public void setAll(double value)
public IndexValue indexWithMaxValue(Set<Integer> indices)
public IndexValue indexWithMaxValue()
public int getDimension()
public double getDefaultValue()
public Vec multiply(double rhs)
public double multiply(Vec rhs)
public Vec pow(double scalar)
public double sum()
public boolean isZero()
public double norm(int level)
public Vec normalize()
Copyright © 2017. All rights reserved.