Represents a continuously sampled sweep of data points.
More...
#include <section.h>
List of all members.
Public Member Functions |
| Section () |
| Default constructor.
|
| Section (const Vector_double &valA, const std::string &label="\0") |
| Constructor.
|
| Section (std::size_t size, const std::string &label="\0") |
| Yet another constructor.
|
| ~Section () |
| Destructor.
|
double & | operator[] (std::size_t at) |
| Unchecked access. Returns a non-const reference.
|
double | operator[] (std::size_t at) const |
| Unchecked access. Returns a copy.
|
double | at (std::size_t at_) const |
| Range-checked access. Returns a copy.
|
double & | at (std::size_t at_) |
| Range-checked access. Returns a non-const reference.
|
const Vector_double & | get () const |
| Low-level access to the valarray (read-only).
|
Vector_double & | get_w () |
| Low-level access to the valarray (read and write).
|
void | resize (std::size_t new_size) |
| Resize the Section to a new number of data points; deletes all previously stored data when gcc is used.
|
size_t | size () const |
| Retrieve the number of data points.
|
void | SetXScale (double value) |
| Sets the x scaling.
|
double | GetXScale () const |
| Retrieves the x scaling.
|
const std::string & | GetSectionDescription () const |
| Retrieves a section description.
|
void | SetSectionDescription (const std::string &value) |
| Sets a section description.
|
Detailed Description
Represents a continuously sampled sweep of data points.
Definition at line 35 of file section.h.
Constructor & Destructor Documentation
Section::Section |
( |
const Vector_double & |
valA, |
|
|
const std::string & |
label = "\0" |
|
) |
| [explicit] |
Constructor.
- Parameters:
-
valA | A vector of values that will make up the section. |
label | An optional section label string. |
Section::Section |
( |
std::size_t |
size, |
|
|
const std::string & |
label = "\0" |
|
) |
| [explicit] |
Yet another constructor.
- Parameters:
-
size | Number of data points. |
label | An optional section label string. |
Member Function Documentation
Range-checked access. Returns a copy.
Throws std::out_of_range if out of range.
- Parameters:
-
- Returns:
- Copy of the data point at index at_
Range-checked access. Returns a non-const reference.
Throws std::out_of_range if out of range.
- Parameters:
-
- Returns:
- Reference to the data point at index at_
Low-level access to the valarray (read-only).
An explicit function is used instead of implicit type conversion to access the valarray.
- Returns:
- The valarray containing the data points.
Definition at line 96 of file section.h.
Low-level access to the valarray (read and write).
An explicit function is used instead of implicit type conversion to access the valarray.
- Returns:
- The valarray containing the data points.
Definition at line 103 of file section.h.
Retrieves a section description.
- Returns:
- A string describing this section.
Definition at line 130 of file section.h.
Retrieves the x scaling.
- Returns:
- The x scaling.
Definition at line 125 of file section.h.
double& Section::operator[] |
( |
std::size_t |
at | ) |
[inline] |
Unchecked access. Returns a non-const reference.
- Parameters:
-
- Returns:
- Copy of the data point with index at.
Definition at line 67 of file section.h.
double Section::operator[] |
( |
std::size_t |
at | ) |
const [inline] |
Unchecked access. Returns a copy.
- Parameters:
-
- Returns:
- Reference to the data point with index at.
Definition at line 73 of file section.h.
Resize the Section to a new number of data points; deletes all previously stored data when gcc is used.
Note that in the gcc implementation of std::vector, resizing will delete all the original data. This is different from std::vector::resize().
- Parameters:
-
new_size | The new number of data points. |
Definition at line 110 of file section.h.
Sets a section description.
- Parameters:
-
value | A string describing this section. |
Definition at line 135 of file section.h.
Sets the x scaling.
- Parameters:
-
Retrieve the number of data points.
- Returns:
- The number of data points.
Definition at line 115 of file section.h.
The documentation for this class was generated from the following file: