All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
StringStatisticalSummary.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file terralib/statistics/StringStatisticalSummary.cpp
22 
23  \brief A struct that can be used to keep the summary of statistics.
24 */
25 
26 // TerraLib
28 
30  : m_minVal(""),
31  m_maxVal(""),
32  m_mode(""),
33  m_count(0),
34  m_validCount(0)
35 {
36 }
37 
39  : m_minVal(""),
40  m_maxVal(""),
41  m_mode(""),
42  m_count(0),
43  m_validCount(0)
44 {
45  m_minVal = rhs.m_minVal;
46  m_maxVal = rhs.m_maxVal;
47  m_mode = rhs.m_mode;
48  m_count = rhs.m_count;
50 }
51 
53 {
54  clear();
55 }
56 
58 {
59  if(this != &rhs)
60  {
61  clear();
62 
63  m_minVal = rhs.m_minVal;
64  m_maxVal = rhs.m_maxVal;
65  m_mode = rhs.m_mode;
66  m_count = rhs.m_count;
67  m_validCount = rhs.m_validCount;
68  }
69 
70  return *this;
71 }
72 
74 {
75  m_minVal = "";
76  m_maxVal = "";
77  m_maxVal = "";
78  m_count = 0;
79  m_validCount = 0;
80 }
StringStatisticalSummary & operator=(const StringStatisticalSummary &rhs)
Assignment operator.
void clear()
Clears all attributes from this class.
A structure to hold the set of statistics from a set of categorical (sample) values.