1 #ifndef gra_IdentityPoints_H__
2 #define gra_IdentityPoints_H__
6 #include "../math/Vector.h"
8 #include "../oo/ObjBase.h"
21 template<
class ID,
class Scalar>
40 dimension_ = b.dimension_;
86 self()->points_.clear();
93 return self->points_.size();
100 return (
size() == 0u);
107 return (self->points_.find(
id) !=
self->points_.end());
114 return self->dimension_;
121 self()->dimension_ = dim;
129 size_t dimension(
size_t dim, Scalar
const& init_value) {
130 self()->dimension_ = dim;
132 it =
self()->points_.begin(); it !=
self()->points_.end(); ++it) {
133 it.second.dimension(dim, init_value);
142 return self->points_;
167 for (
typename std::set<ID>::const_iterator
168 it = ids.begin(); it != ids.end(); ++it) {
205 self()->points_.erase(
id);
212 return self()->points_[
id];
226 bool write(FILE* f,
bool bin,
unsigned int fg)
const {
234 bool read(FILE* f,
bool bin,
unsigned int fg) {
264 static char const* ptr =
typeid(*this).name();
273 return std::string(
ctype());
279 #endif // gra_IdentityPoints_H__