statistics.hh:
change VectorDistProxy name to DistProxy - to be more consistent with other proxy namings. base/statistics.hh: change VectorDistProxy name to DistProxy - to be more consistent with other proxy namings. --HG-- extra : convert_revision : c470c93cf598506be56312db52f6c528c213a149
This commit is contained in:
parent
e0b065ff7c
commit
f600ac613e
1 changed files with 13 additions and 13 deletions
|
@ -1436,7 +1436,7 @@ class DistBase : public Stat
|
|||
};
|
||||
|
||||
template <typename T, template <typename T> class Storage, class Bin>
|
||||
class VectorDistProxy;
|
||||
class DistProxy;
|
||||
|
||||
template <typename T, template <typename T> class Storage, class Bin>
|
||||
class VectorDistBase : public Stat
|
||||
|
@ -1465,9 +1465,9 @@ class VectorDistBase : public Stat
|
|||
VectorDistBase() : Stat(true) { }
|
||||
~VectorDistBase() { }
|
||||
|
||||
friend class VectorDistProxy<T, Storage, Bin>;
|
||||
VectorDistProxy<T, Storage, Bin> operator[](int index);
|
||||
const VectorDistProxy<T, Storage, Bin> operator[](int index) const;
|
||||
friend class DistProxy<T, Storage, Bin>;
|
||||
DistProxy<T, Storage, Bin> operator[](int index);
|
||||
const DistProxy<T, Storage, Bin> operator[](int index) const;
|
||||
|
||||
virtual size_t size() const { return bin.size(); }
|
||||
virtual bool zero() const { return false; }
|
||||
|
@ -1475,7 +1475,7 @@ class VectorDistBase : public Stat
|
|||
};
|
||||
|
||||
template <typename T, template <typename T> class Storage, class Bin>
|
||||
class VectorDistProxy : public Stat
|
||||
class DistProxy : public Stat
|
||||
{
|
||||
protected:
|
||||
typedef Storage<T> storage_t;
|
||||
|
@ -1495,11 +1495,11 @@ class VectorDistProxy : public Stat
|
|||
const storage_t *data() const { return cstat->data(index); }
|
||||
|
||||
public:
|
||||
VectorDistProxy(const VectorDistBase<T, Storage, Bin> &s, int i)
|
||||
DistProxy(const VectorDistBase<T, Storage, Bin> &s, int i)
|
||||
: Stat(false), cstat(&s), index(i) {}
|
||||
VectorDistProxy(const VectorDistProxy &sp)
|
||||
DistProxy(const DistProxy &sp)
|
||||
: Stat(false), cstat(sp.cstat), index(sp.index) {}
|
||||
const VectorDistProxy &operator=(const VectorDistProxy &sp) {
|
||||
const DistProxy &operator=(const DistProxy &sp) {
|
||||
cstat = sp.cstat; index = sp.index; return *this;
|
||||
}
|
||||
|
||||
|
@ -1531,19 +1531,19 @@ class VectorDistProxy : public Stat
|
|||
};
|
||||
|
||||
template <typename T, template <typename T> class Storage, class Bin>
|
||||
inline VectorDistProxy<T, Storage, Bin>
|
||||
inline DistProxy<T, Storage, Bin>
|
||||
VectorDistBase<T, Storage, Bin>::operator[](int index)
|
||||
{
|
||||
assert (index >= 0 && index < size());
|
||||
return VectorDistProxy<T, Storage, Bin>(*this, index);
|
||||
return DistProxy<T, Storage, Bin>(*this, index);
|
||||
}
|
||||
|
||||
template <typename T, template <typename T> class Storage, class Bin>
|
||||
inline const VectorDistProxy<T, Storage, Bin>
|
||||
inline const DistProxy<T, Storage, Bin>
|
||||
VectorDistBase<T, Storage, Bin>::operator[](int index) const
|
||||
{
|
||||
assert (index >= 0 && index < size());
|
||||
return VectorDistProxy<T, Storage, Bin>(*this, index);
|
||||
return DistProxy<T, Storage, Bin>(*this, index);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1554,7 +1554,7 @@ void
|
|||
VectorDistBase<T, Storage, Bin>::display(std::ostream &stream) const
|
||||
{
|
||||
for (int i = 0; i < size(); ++i) {
|
||||
VectorDistProxy<T, Storage, Bin> proxy(*this, i);
|
||||
DistProxy<T, Storage, Bin> proxy(*this, i);
|
||||
proxy.display(stream);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue