OpenCores
URL https://opencores.org/ocsvn/w11/w11/trunk

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.7/] [tools/] [src/] [librtools/] [Rstats.ipp] - Blame information for rev 33

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 19 wfjm
// $Id: Rstats.ipp 488 2013-02-16 18:49:47Z mueller $
2 10 wfjm
//
3
// Copyright 2011- by Walter F.J. Mueller 
4
//
5
// This program is free software; you may redistribute and/or modify it under
6
// the terms of the GNU General Public License as published by the Free
7
// Software Foundation, either version 2, or at your option any later version.
8
//
9
// This program is distributed in the hope that it will be useful, but
10
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
11
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12
// for complete details.
13
//
14
// Revision History:
15
// Date         Rev Version  Comment
16
// 2011-02-06   359   1.0    Initial version
17
// ---------------------------------------------------------------------------
18
 
19
/*!
20
  \file
21 19 wfjm
  \version $Id: Rstats.ipp 488 2013-02-16 18:49:47Z mueller $
22 10 wfjm
  \brief   Implemenation (inline) of Rstats.
23
*/
24
 
25 19 wfjm
// all method definitions in namespace Retro
26 10 wfjm
namespace Retro {
27
 
28
//------------------------------------------+-----------------------------------
29
//! FIXME_docs
30
 
31
inline void Rstats::Set(size_t ind, double val)
32
{
33
  fValue.at(ind) = val;
34
  return;
35
}
36
 
37
//------------------------------------------+-----------------------------------
38
//! FIXME_docs
39
 
40
inline void Rstats::Inc(size_t ind, double val)
41
{
42
  fValue.at(ind) += val;
43
  return;
44
}
45
 
46
//------------------------------------------+-----------------------------------
47
//! FIXME_docs
48
 
49
inline size_t Rstats::Size() const
50
{
51
  return fValue.size();
52
}
53
 
54
//------------------------------------------+-----------------------------------
55
//! FIXME_docs
56
 
57
inline double Rstats::Value(size_t ind) const
58
{
59
  return fValue.at(ind);
60
}
61
 
62
//------------------------------------------+-----------------------------------
63
//! FIXME_docs
64
 
65
inline const std::string& Rstats::Name(size_t ind) const
66
{
67
  return fName.at(ind);
68
}
69
 
70
//------------------------------------------+-----------------------------------
71
//! FIXME_docs
72
 
73
inline const std::string& Rstats::Text(size_t ind) const
74
{
75
  return fText.at(ind);
76
}
77
 
78
//------------------------------------------+-----------------------------------
79
//! FIXME_docs
80
 
81
inline double Rstats::operator[](size_t ind) const
82
{
83
  return fValue.at(ind);
84
}
85
 
86
//------------------------------------------+-----------------------------------
87
/*!
88
  \relates Rstats
89
  \brief ostream insertion operator.
90
*/
91
 
92
inline std::ostream& operator<<(std::ostream& os, const Rstats& obj)
93
{
94
  obj.Print(os);
95
  return os;
96
}
97
 
98
} // end namespace Retro

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.