OpenWAM
Functions
labels.hpp File Reference
#include <map>
#include <string>
Include dependency graph for labels.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void init_labels ()
 Initialises the labels.
 
std::string PutLabel (int idx)
 Returns an integer. More...
 

Detailed Description

Author
Luis Miguel Garcia-Cuevas Gonzalez luiga.nosp@m.12@m.nosp@m.ot.up.nosp@m.v.es
Version
0.1

LICENSE

This file is part of OpenWAM.

OpenWAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

OpenWAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with OpenWAM. If not, see http://www.gnu.org/licenses/.

DESCRIPTION

The function declared here is used to get labels using an index.

Definition in file labels.hpp.

Function Documentation

◆ PutLabel()

std::string PutLabel ( int  idx)

Returns an integer.

Given an integer, it returns a label.

Parameters
idxLabel index.
Returns
Label.

Definition at line 475 of file labels.cpp.

475  {
476  if(idx < 900) {
477  if(labels[10000].compare("ES") == 0) {
478  idx += 2000;
479  } else if(labels[10000].compare("EN") == 0) {
480  idx += 1000;
481  }
482  }
483  return labels[idx];
484 }
Here is the caller graph for this function: