Cruft removal

git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4243 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
heafield 2011-09-20 19:29:24 +00:00
parent b9e433977d
commit 4c8552b16f
2 changed files with 8 additions and 26 deletions

View File

@ -22,27 +22,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#ifndef moses_Factor_h
#define moses_Factor_h
#include <sstream>
#include <iostream>
#include <list>
#include <vector>
#include <map>
#include <ostream>
#include <string>
#include "TypeDef.h"
#include "Util.h"
#include "hash.h"
namespace Moses
{
class FactorCollection;
/** Represents a factor (word, POS, etc) on the E or F side
*
* A Factor object is a tuple of direction (Input or Output,
* corresponding to French or English), a type (surface form,
* POS, stem, etc), and the value of the factor.
/** Represents a factor (word, POS, etc).
*
* A Factor has a contiguous identifier and string value.
*/
class Factor
{
@ -76,15 +68,15 @@ public:
* 0 = same
*/
inline int Compare(const Factor &compare) const {
if (m_ptrString < compare.m_ptrString)
if (this < &compare)
return -1;
if (m_ptrString > compare.m_ptrString)
if (this > &compare)
return 1;
return 0;
}
//! transitive comparison used for adding objects into FactorCollection
inline bool operator<(const Factor &compare) const {
return m_ptrString < compare.m_ptrString;
return this < &compare;
}
// quick equality comparison. Not used

View File

@ -19,12 +19,9 @@ License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
***********************************************************************/
#include <iostream>
#include <fstream>
#include <ostream>
#include <string>
#include <vector>
#include "FactorCollection.h"
#include "LanguageModel.h"
#include "Util.h"
using namespace std;
@ -63,14 +60,7 @@ const Factor *FactorCollection::AddFactor(FactorDirection direction
return &ret.first->second;
}
FactorCollection::~FactorCollection()
{
//FactorSet::iterator iter;
//for (iter = m_collection.begin() ; iter != m_collection.end() ; iter++)
//{
// delete (*iter);
//}
}
FactorCollection::~FactorCollection() {}
TO_STRING_BODY(FactorCollection);