29 #ifndef _ENVIRONMENTHH_
30 #define _ENVIRONMENTHH_
54 const std::vector<std::string>& maps,
55 const std::string& mask_file );
58 const std::vector<std::string>& maps );
75 const std::vector<std::string>& maps,
76 const std::string& mask_file );
79 const std::vector<std::string>& maps );
85 typedef std::pair<std::string, Map*>
layer;
98 const std::vector<std::string>& maps,
99 const std::string& mask_file =
"" );
108 unsigned int numLayers()
const {
return _layers.size(); }
110 size_t numCategoricalLayers()
const;
115 int isCategorical(
int i );
128 void resetNormalization();
152 int checkCoordinates(
Coord x,
Coord y )
const;
168 int changeMask(
const std::string& mask_file );
172 const std::string&
getLayerPath(
int index)
const {
return _layers[index].first; }
176 void removeLayer(
unsigned int index);
184 void initialize(
const std::vector<std::string>& categs,
185 const std::vector<std::string>& maps,
186 const std::string& mask_file=
"" );
203 static ConfigurationPtr getLayerConfig(
const layer& l,
bool basicConfig=
false );
207 static void loadLayers(
const std::vector<std::string>& map_ids, std::vector<Map*>& map_refs,
int categ=0 );
212 static layer makeLayer(
const std::string& filename,
int categ );
213 static layer makeLayer(
const std::string& filename,
Map *map );
216 int changeLayers(
const std::vector<std::string>& categs,
217 const std::vector<std::string>& maps );
Normalizer * _normalizerPtr
Normalize the environment.
virtual ConfigurationPtr getConfiguration() const =0
std::pair< std::string, Map * > layer
unsigned int numLayers() const
const std::string & getLayerPath(int index) const
const std::string & getMaskPath() const
Coord _xmin
Intersection of all layers.
Coord _ymax
Intersection of all layers.
Map * getLayer(int index) const
Coord _xmax
Intersection of all layers.
Coord _ymin
Intersection of all layers.
EnvironmentPtr dllexp createEnvironment(const std::vector< std::string > &categs, const std::vector< std::string > &maps, const std::string &mask_file)
virtual void getMinMax(Sample *min, Sample *max) const =0
ReferenceCountedPointer< const EnvironmentImpl > ConstEnvironmentPtr
ReferenceCountedPointer< EnvironmentImpl > EnvironmentPtr
std::vector< layer > layers
virtual void setConfiguration(const ConstConfigurationPtr &)=0
virtual void normalize(Normalizer *normalizerPtr)=0
double Coord
Type of map coordinates.
layer _mask
Mask (can be 0).
layers _layers
Vector with all layers that describe the variables.