LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
integerCost.h
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#ifndef LIMA_POSTAGGER_INTEGERCOST_H
7#define LIMA_POSTAGGER_INTEGERCOST_H
8
9#include "PosTaggerExport.h"
10#include <iostream>
11#include <limits>
12#include <common/LimaCommon.h>
13
14namespace Lima
15{
16namespace LinguisticProcessing
17{
18namespace PosTagger
19{
20
22{
23
24 friend LIMA_POSTAGGER_EXPORT std::ostream& operator<<(std::ostream& out,const IntegerCost& cost);
25
26public:
28
29 IntegerCost(uint64_t cost);
30
31// IntegerCost(const IntegerCost& fc);
32
33 virtual ~IntegerCost();
34
35 bool operator<(const IntegerCost& fc) const;
36 bool operator==(const IntegerCost& fc) const;
37 IntegerCost operator+(const IntegerCost& fc) const;
38 IntegerCost& operator+=(const IntegerCost& fc);
39
40 inline bool operator!=(const IntegerCost& fc) const { return !(operator==(fc));}
41
42private:
43
44 uint64_t m_cost;
45};
46
47#ifdef WIN32
48#undef max
49#endif
50
52{
53public:
54
56
58 const IntegerCostFunction& cf);
59
60 virtual ~IntegerCostFunction();
61
62 IntegerCost operator()(LinguisticCode cat1, LinguisticCode cat2, LinguisticCode cat3) const;
63
64 inline IntegerCost getMinimumCost() const { return 0; }
65
66 inline IntegerCost getMaximumCost() const { return std::numeric_limits<uint64_t>::max(); }
67
68private:
69
70
71};
72
73} // PosTagger
74} // LinguisticProcessing
75} // Lima
76
77#endif
QDebug & operator<<(QDebug &qd, const std::string &str)
Definition QsLog.cpp:39
#define LIMA_POSTAGGER_EXPORT
bool operator!=(const IntegerCost &fc) const
Definition integerCost.h:40
NAUTITIA.
static bool operator<(const QStringView &entityStr, const TextHtmlEntity &entity)