A table of equidistant entries.
More...
#include <YScanner.h>
|
| Table () |
| Default constructor.
|
|
void | clear () |
| Clear the content entirely.
|
|
void | set (double X0, double Step) |
| Sets the first x and the step, and clears the entries.
|
|
void | set (const Table &T) |
| Sets the first x and the step, and clears the entries.
|
|
double | getX (int i) const |
| Returns x for a given index.
|
|
double | getXmin () const |
| Returns x of the first entry.
|
|
double | getXmax () const |
| Returns x of the last entry.
|
|
int | getIndex (double x) const |
| Returns index.
|
|
double | getY (int i) const |
| Returns y for a given index.
|
|
A table of equidistant entries.
Definition at line 118 of file YScanner.h.
◆ Table()
◆ clear()
Clear the content entirely.
Definition at line 511 of file YScanner.h.
512 {
516 }
std::vector< TableEntry > entries
table entries
double x0
x of first entry
◆ getIndex()
int getIndex |
( |
double |
x | ) |
const |
|
inline |
Returns index.
- Returns
- index (note: the range is not limited to the range of entries)
Definition at line 538 of file YScanner.h.
538{
return lround((x -
x0) /
step);}
◆ getX()
double getX |
( |
int |
i | ) |
const |
|
inline |
Returns x for a given index.
- Returns
- x
Definition at line 532 of file YScanner.h.
◆ getXmax()
Returns x of the last entry.
- Returns
- maximal x
Definition at line 536 of file YScanner.h.
◆ getXmin()
Returns x of the first entry.
- Returns
- minimal x
Definition at line 534 of file YScanner.h.
◆ getY()
double getY |
( |
int |
i | ) |
const |
|
inline |
Returns y for a given index.
- Returns
- y or 0 if index is out of range
Definition at line 540 of file YScanner.h.
541 {
542 unsigned k = i;
543 if (k >=
entries.size())
return 0;
545 }
◆ set() [1/2]
void set |
( |
const Table & |
T | ) |
|
|
inline |
Sets the first x and the step, and clears the entries.
- Parameters
-
Definition at line 525 of file YScanner.h.
◆ set() [2/2]
void set |
( |
double |
X0, |
|
|
double |
Step |
|
) |
| |
|
inline |
Sets the first x and the step, and clears the entries.
- Parameters
-
X0 | x of the first entry |
Step | step size |
Definition at line 518 of file YScanner.h.
◆ entries
◆ step
◆ x0
The documentation for this struct was generated from the following file: