diff options
author | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2012-05-30 18:11:09 +0400 |
---|---|---|
committer | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2012-05-30 18:11:09 +0400 |
commit | beb2256dbaf420ed525cc8354617ead0db315060 (patch) | |
tree | f5ef7deca385e984563e720f4ae2d7cd887018a3 /mert/MiraFeatureVector.h | |
parent | 01eb60f35031157b5a780e539473dfd88a7714d1 (diff) |
Move 'using namespace std' out from .h.
Add "std" to size_t, too.
Diffstat (limited to 'mert/MiraFeatureVector.h')
-rw-r--r-- | mert/MiraFeatureVector.h | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/mert/MiraFeatureVector.h b/mert/MiraFeatureVector.h index 27a4510ad..31dd025c3 100644 --- a/mert/MiraFeatureVector.h +++ b/mert/MiraFeatureVector.h @@ -16,8 +16,6 @@ #include "FeatureDataIterator.h" -using namespace std; - typedef FeatureStatsType ValType; class MiraFeatureVector { @@ -25,20 +23,20 @@ public: MiraFeatureVector(const FeatureDataItem& vec); MiraFeatureVector(const MiraFeatureVector& other); MiraFeatureVector(const std::vector<ValType>& dense, - const std::vector<size_t>& sparseFeats, + const std::vector<std::size_t>& sparseFeats, const std::vector<ValType>& sparseVals); - - ValType val(size_t index) const; - size_t feat(size_t index) const; - size_t size() const; + + ValType val(std::size_t index) const; + std::size_t feat(std::size_t index) const; + std::size_t size() const; ValType sqrNorm() const; - + friend MiraFeatureVector operator-(const MiraFeatureVector& a, const MiraFeatureVector& b); - + private: std::vector<ValType> m_dense; - std::vector<size_t> m_sparseFeats; + std::vector<std::size_t> m_sparseFeats; std::vector<ValType> m_sparseVals; }; |