Michele De Stefano's C++ Utilities
indexing_example.hpp
1 // indexing_example.hpp
2 //
3 // Copyright (c) 2014 - Michele De Stefano (micdestefano@users.sourceforge.net)
4 //
5 // Distributed under the MIT License (See accompanying file LICENSE)
6 
19 #include <vector>
21 
22 
24 
25  std::vector<double> m_v;
26 
27 public:
28 
29  typedef double value_type;
30 
32 
33  size_t get_nel() const;
34 
35  double get_el_at(size_t i) const;
36 
37  void set_el_at(size_t i,double val);
38 };
39 
Contains utilities for easy Python operators support into extension modules.
Adds support for random get/set access operator (i.e. square brackets) to a class that has to be expo...