|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ocvolume.vq.point | +--ocvolume.vq.centroid
last updated on June 15, 2002
description: centroid of a codebook
calls: point
called by: codebook
input: k-dimensional points
output: distortion measure
Field Summary | |
protected double |
distortion
distortion measure - sum of all points' distances from the centroid |
protected java.util.Vector |
pts
stores the points that belong to this centroid or cell |
protected int |
total_pts
total number of points that belong to this centroid or cell |
Fields inherited from class ocvolume.vq.point |
coordinates, dimension |
Constructor Summary | |
centroid(double[] Co)
constructor to create a centroid from input coordinates calls: none called by: codebook |
Method Summary | |
void |
add(point pt,
double dist)
add point to centroid's cell calls: none called by: codebook |
double |
getDistortion()
returns the distortion measure of the current cell calls: none called by: codebook |
int |
getNumPts()
returns the number of points in this cell calls: none called by: codebook |
point |
getPoint(int index)
get a point at specified index calls: none called by: codebook |
void |
remove(point pt,
double dist)
removes a given point from the centroid's cell calls: none called by: codebook |
void |
update()
update centroid by taking average of all points in the cell calls: none called by: codebook |
Methods inherited from class ocvolume.vq.point |
changeCo, equals, getAllCo, getCo, getDimension, setCo |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected double distortion
protected java.util.Vector pts
protected int total_pts
Constructor Detail |
public centroid(double[] Co)
Co
- coordinates arrayMethod Detail |
public point getPoint(int index)
index
- index number
public int getNumPts()
public void remove(point pt, double dist)
pt
- the point to be removeddist
- distance from the centroidpublic void add(point pt, double dist)
pt
- a point belonging to the centroiddist
- distance from the centroidpublic void update()
public double getDistortion()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |