#include <Neighborhood_System.hpp>
Inheritance diagram for Generic_Neighborhood_System:
Public Member Functions | |
Generic_Neighborhood_System () | |
Default constructor. | |
~Generic_Neighborhood_System () | |
Destructor. | |
void | DeleteAll () |
Free all the memory used by the object. | |
void | GetNeighbors (uint site, vector< Weighted_Neighbor * > &neighs) |
Get the (weighted) neighbors for a given site. | |
void | ReadFromFile (string filename) |
void | WriteToFile (string filename, bool save_weights) |
Writes the definition of the generic neighborhood system to a text file. weights may be discarded. | |
void | WriteToFile (string filename) |
Writes the definition of the generic neighborhood system to a text file. weights included. | |
void | Info () |
|
Default constructor. Sets the number of sites to zero. |
|
Default destructor. Calls DeleteAll . |
|
Frees all memory allocated and used by the neighborhood information. |
|
Get the (weighted) neighbors for a given site.
Abstract. To be defined for the derived classes. Reimplemented from Neighborhood_System. |
|
Display some info about the neighborhood system. for verification purposes. Displays :
Reimplemented from Neighborhood_System. |
|
Reads the object definition from a text file.
The first line contains a number ( 0 or 1) depending on wether weights are present (1) or not (0). The following lines give for each site i the following information
i k j1, ....jk where k is the number of neighbors , j1 ... jk are the neighbors of i. and if weights are present (first line == 1 ) , the weights are appended to this line, this gives :
i k j1 ... jk wi1 ... wik a typical example file is :
1 1 2 2 3 0.5 0.4 2 1 1 0.7 3 2 1 2 0.6 0.5 Reimplemented from Neighborhood_System. |
|
Write the neighborhood definition to a text file. Forces the weights presence in the output.
|
|
Write the neighborhood definition to a text file.
|