LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
integerCost.cpp
Go to the documentation of this file.
1// Copyright 2002-2013 CEA LIST
2// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3//
4// SPDX-License-Identifier: MIT
5
6#include "integerCost.h"
7
8namespace Lima
9{
10namespace LinguisticProcessing
11{
12namespace PosTagger
13{
14
16m_cost(0)
17{}
18
20m_cost(cost)
21{}
22
24
26{
27 return m_cost<fc.m_cost;
28}
29
31{
32 return (m_cost==fc.m_cost);
33}
34
35std::ostream& operator<<(std::ostream& out,const IntegerCost& cost)
36{
37 out << "intcost{" << cost.m_cost << "}";
38 return out;
39}
40
41
43{
44 return IntegerCost(m_cost+fc.m_cost);
45}
46
48{
49 m_cost+=fc.m_cost;
50 return *this;
51}
52
53
54
57
62
64
72
73} // PosTagger
74} // LinguisticProcessing
75}// Lima
#define LIMA_UNUSED(x)
Definition LimaCommon.h:224
IntegerCost operator()(LinguisticCode cat1, LinguisticCode cat2, LinguisticCode cat3) const
bool operator<(const IntegerCost &fc) const
bool operator==(const IntegerCost &fc) const
IntegerCost operator+(const IntegerCost &fc) const
IntegerCost & operator+=(const IntegerCost &fc)
std::ostream & operator<<(std::ostream &out, const FrequencyCost &cost)
NAUTITIA.