Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTetsuo Kiso <tetsuo-s@is.naist.jp>2012-05-10 02:51:05 +0400
committerTetsuo Kiso <tetsuo-s@is.naist.jp>2012-05-10 02:51:05 +0400
commit9c9d88a78a13d7bd5ad4f10b06c355519e4e41ad (patch)
tree7961401877857cf42849916ef7aaba8258a1bc55 /mert/Point.h
parentaa269bdb4d82207d1381069c256745780f7cd798 (diff)
Avoid "using namespace std" in headers.
Diffstat (limited to 'mert/Point.h')
-rw-r--r--mert/Point.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/mert/Point.h b/mert/Point.h
index 46b23c9d9..4be1219fe 100644
--- a/mert/Point.h
+++ b/mert/Point.h
@@ -13,7 +13,7 @@ class Optimizer;
* A class that handles the subset of the Feature weight on which
* we run the optimization.
*/
-class Point : public vector<parameter_t>
+class Point : public std::vector<parameter_t>
{
friend class Optimizer;
@@ -21,7 +21,7 @@ private:
/**
* The indices over which we optimize.
*/
- static vector<unsigned int> m_opt_indices;
+ static std::vector<unsigned int> m_opt_indices;
/**
* Dimension of m_opt_indices and of the parent vector.
@@ -31,7 +31,7 @@ private:
/**
* Fixed weights in case of partial optimzation.
*/
- static map<unsigned int,parameter_t> m_fixed_weights;
+ static std::map<unsigned int,parameter_t> m_fixed_weights;
/**
* Total size of the parameter space; we have
@@ -43,23 +43,23 @@ private:
/**
* The limits for randomization, both vectors are of full length, m_pdim.
*/
- static vector<parameter_t> m_min;
- static vector<parameter_t> m_max;
+ static std::vector<parameter_t> m_min;
+ static std::vector<parameter_t> m_max;
statscore_t m_score;
public:
static unsigned int getdim() { return m_dim; }
- static void setdim(size_t d) { m_dim = d; }
+ static void setdim(std::size_t d) { m_dim = d; }
static unsigned int getpdim() { return m_pdim; }
- static void setpdim(size_t pd) { m_pdim = pd; }
+ static void setpdim(std::size_t pd) { m_pdim = pd; }
- static void set_optindices(const vector<unsigned int>& indices) {
+ static void set_optindices(const std::vector<unsigned int>& indices) {
m_opt_indices = indices;
}
- static const vector<unsigned int>& get_optindices() {
+ static const std::vector<unsigned int>& get_optindices() {
return m_opt_indices;
}
@@ -68,9 +68,9 @@ public:
}
Point();
- Point(const vector<parameter_t>& init,
- const vector<parameter_t>& min,
- const vector<parameter_t>& max);
+ Point(const std::vector<parameter_t>& init,
+ const std::vector<parameter_t>& min,
+ const std::vector<parameter_t>& max);
~Point();
void Randomize();
@@ -84,7 +84,7 @@ public:
/**
* Write the Whole featureweight to a stream (ie m_pdim float).
*/
- friend ostream& operator<<(ostream& o,const Point& P);
+ friend std::ostream& operator<<(std::ostream& o,const Point& P);
void Normalize() { NormalizeL2(); }
void NormalizeL2();
@@ -94,7 +94,7 @@ public:
* Return a vector of size m_pdim where all weights have been
* put (including fixed ones).
*/
- void GetAllWeights(vector<parameter_t>& w) const;
+ void GetAllWeights(std::vector<parameter_t>& w) const;
statscore_t GetScore() const { return m_score; }
void SetScore(statscore_t score) { m_score = score; }