Neighborhood Class Reference

This class represents the desired form for the neighborhood. More...

#include <Neighborhood.h>

List of all members.

Public Member Functions

 Neighborhood (int size=1)
 The constructor.
 Neighborhood (const Neighborhood &n)
 The copy-constructor:.
Neighborhoodoperator= (const Neighborhood &n)
 Overwrite the = operator to avoid problems when you forget initialize whit the constructor.
 ~Neighborhood ()
 the destructor
std::vector< std::vector<
int > > 
getNeighborhood ()
 Return the container of positions of the neighbors (neighborsPositions).
int getSize ()
 What size is the diameter of the Neighborhood?
void setSize (int s)
 Change the size of the diameter of the Neighborhood.
virtual void calculateNeighborhood (const std::vector< int > position)

Public Attributes

std::vector< std::vector<
int > > 
neighborsPositions
std::vector< int > neighborCoordinates
int size


Detailed Description

This class represents the desired form for the neighborhood.

This class represents the "form" of the neighborhood for some center cell, the specific edges of a vertex. This class specify the desired form for the neighborhood, then the topology class specify if this form can be created, and how. This mix and the derived correlation's are performed in the map class.


Member Function Documentation

virtual void Neighborhood::calculateNeighborhood ( const std::vector< int >  position  )  [inline, virtual]

This is the main method in the class. In this method, the container of neighbor positions, is fill with the vector positions of the neighbors, the positions of the vertex with an edge to the vertex represented by the input vector (the vertex position).


Member Data Documentation

std::vector<int> Neighborhood::neighborCoordinates

This vector will be used for create a neighbor position and push in to the container (neighborsPositions).

std::vector< std::vector<int> > Neighborhood::neighborsPositions

This is the container of neighbor's positions vectors the edges positions set, for some center cell, some vertex.

int Neighborhood::size

The size variable represents how far we are gonna take neighbors. For example if we take size = 1, in the tower neighborhood (1 dimension) you have: 0X0 and if we have size = 2 we have: 00X00 The x is the center cell, and the 0's are the neighbors


The documentation for this class was generated from the following file:
Generated on Thu Aug 17 00:04:37 2006 for Cagecpp by  doxygen 1.4.7