KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
m_sequence.h
Go to the documentation of this file.
1 /* $Id: m_sequence.h 18280 2014-11-25 03:36:33Z ksimek $ */
2 /* =========================================================================== *
3  |
4  | Copyright (c) 1994-2010 by Kobus Barnard (author)
5  |
6  | Personal and educational use of this code is granted, provided that this
7  | header is kept intact, and that the authorship is not misrepresented, that
8  | its use is acknowledged in publications, and relevant papers are cited.
9  |
10  | For other use contact the author (kobus AT cs DOT arizona DOT edu).
11  |
12  | Please note that the code in this file has not necessarily been adequately
13  | tested. Naturally, there is no guarantee of performance, support, or fitness
14  | for any particular task. Nonetheless, I am interested in hearing about
15  | problems that you encounter.
16  |
17  | Author: Kyle Simek
18  * =========================================================================== */
19 
20 #ifndef KJB_CPP_M_SEQUENCE
21 #define KJB_CPP_M_SEQUENCE
22 
23 #include <vector>
24 #include <stdlib.h>
25 
26 namespace kjb
27 {
35 class Sequence
36 {
37 public:
41  virtual double operator[](size_t index) = 0;
42 };
43 
44 
45 
50 {
51 public:
68  Interval_sequence(double start, double interval, double end);
69 
70  virtual double operator[](size_t index) const;
71 
72  std::vector<double> to_vector() const;
73 private:
74  double start_;
75  double end_;
76  double interval_;
77 };
78 
79 } // namespace kjb
80 
81 #endif
Definition: m_sequence.h:49
Definition: m_sequence.h:35
virtual double operator[](size_t index) const
Definition: m_sequence.cpp:38
virtual double operator[](size_t index)=0
Interval_sequence(double start, double interval, double end)
Definition: m_sequence.cpp:28
std::vector< double > to_vector() const
Definition: m_sequence.cpp:49