#include <Spatial_Data.hpp>
Public Member Functions | |
Spatial_Data () | |
Default Constructor. | |
Spatial_Data (Data *d, Neighborhood_System *nhs) | |
Constructor. | |
~Spatial_Data () | |
Destructor. | |
void | DeleteAll () |
Free all the memory used by this object. | |
void | Get (uint i, vector< double > &obs) |
Get the observation at site i. | |
double | Get (uint i, uint d) |
Get X_i[d]. | |
uint | GetLabel (uint i) |
Get the label of site i. | |
void | GetLabels (vector< uint > &labs) |
Get all the labels. | |
uint | Get_N () |
Get the number of sites. | |
uint | Get_D () |
Get the dimension of observations. | |
Neighborhood_System * | Get_NS () |
void | GetNeighbors (uint site, vector< Weighted_Neighbor * > &neighs) |
Get the neighbors for a given site. | |
void | ReadStructureFromFile (string filename) |
Read the structure of the spatial data set. | |
void | ReadDataFromFile (string filename) |
Read the dataset from a file. | |
void | ReadNeighborhoodFromFile (string filename) |
Read the neighborhood from a file. | |
void | ReadFromFile (string filename) |
Read from a file. | |
void | WriteToFile (string filename) |
Write to a file. | |
void | Stats (vector< double > &mean, vector< double > &cov) |
Compute the (empirical) mean and covariance of the data. | |
void | K_means (uint K, vector< double > ¢ers, vector< uint > &labels) |
K-means algorithm. | |
void | Info () |
display some information about the spatial dataset. |
All the algorithms, models defined later will access data through an object of this class.
A spatial dataset is given by :
These two members are private. they are only accessible through some (shortcut) methods.
|
Default constructor. Creates a spatial dataset with a default dataset and a default neighborhood system. |
|
Default constructor.
|
|
Deletes the object. Calls DeleteAll |
|
Frees all the memory used by the object. |
|
Get X_i[d] |
|
Get the observation at the site i.
|
|
Get the dimension.
|
|
Get the number of observations, i.e. , the size of the dataset.
|
|
Get the neighborhood system. |
|
Get the label at the site i.
|
|
Get the labels.
|
|
Get the (weighted) neighbors for a given site (in the underlying neighborhood system).
|
|
Display some information about the spatial dataset. Calls Data::Info() |
|
K-means algorithm |
|
Read the embedded dataset from a file.
|
|
Read data and neighborhood system from a file.
|
|
Read the embedded neighborhood system from a file.
|
|
Read the structure of 5the spatial dataset in a file.
On a unique line : type size dim where :
S 65536 4 or
I 256 256 4 |
|
Compute simple statistics from the data (mean and covariance). Useful for estimating a gaussain distribution. |
|
Write data and neighborhood system to a file.
|