public class SymmetricByteDistanceMatrix extends Object
| Modifier and Type | Field and Description |
|---|---|
boolean |
loadSuccess |
static int |
MAX_VALUE |
| Constructor and Description |
|---|
SymmetricByteDistanceMatrix(int size)
Creates a new instance of SymmetricByteDistancaMatrix
Defines a new Symmetric matrix, with a predefined size
Initially all values will be Byte.MAX_Value (127)
All data is stored in memory efficient one dimensional array, which costs size * (size + 1) / 2 bytes
|
SymmetricByteDistanceMatrix(int size,
boolean setMaxDistance) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
int |
get(int x,
int y) |
void |
getAllPairsShortestPath() |
int |
getDistance(double pValue) |
double |
getPValue(int distance) |
Vector |
getShortestPath(int x,
int y) |
void |
load(File fileName) |
int |
maxValue() |
void |
save(File fileName) |
void |
set(int x,
int y,
int value) |
void |
setAllElements(int value) |
int |
size() |
public static final int MAX_VALUE
public boolean loadSuccess
public SymmetricByteDistanceMatrix(int size)
public SymmetricByteDistanceMatrix(int size,
boolean setMaxDistance)
public void dispose()
public void setAllElements(int value)
public void set(int x,
int y,
int value)
public int get(int x,
int y)
public int size()
public int maxValue()
public void getAllPairsShortestPath()
public Vector getShortestPath(int x, int y)
public int getDistance(double pValue)
public double getPValue(int distance)
public void save(File fileName)
public void load(File fileName)
Copyright © 2015. All Rights Reserved.