Class astrea::trace::RiseSetArray¶
ClassList > astrea > trace > RiseSetArray
Represents an array of rise and set times. More...
#include <RiseSetArray.hpp>
Public Types¶
| Type | Name |
|---|---|
| typedef std::vector< Time >::const_iterator | const_iterator Constant iterator type for the RiseSetArray . |
| typedef std::vector< Time >::iterator | iterator Iterator type for the RiseSetArray . |
Public Functions¶
| Type | Name |
|---|---|
| RiseSetArray () = default Default constructor for RiseSetArray . |
|
| RiseSetArray (const std::vector< Time > & risesets) Constructs a RiseSetArray from a vector of Time objects. |
|
| RiseSetArray (const RiseSetArray & other) Copy constructor for RiseSetArray . |
|
| RiseSetArray (RiseSetArray && other) noexcept Move constructor for RiseSetArray . |
|
| Time | access_time (const StatType & stat=StatType::AVG, const Unitless percentile=0.5) const Calculates the access time based on rise and set times. |
| void | append (const Time & rise, const Time & set) Appends a rise and set time to the array. |
| Time | average_daily_vis_time () const Calculates the average daily visibility time based on the rise and set times. |
| iterator | begin () Returns an iterator to the beginning of the RiseSetArray . |
| const_iterator | begin () const Returns a constant iterator to the beginning of the RiseSetArray . |
| const_iterator | cbegin () const Returns a constant iterator to the beginning of the RiseSetArray . |
| const_iterator | cend () const Returns a constant iterator to the end of the RiseSetArray . |
| iterator | end () Returns an iterator to the end of the RiseSetArray . |
| const_iterator | end () const Returns a constant iterator to the end of the RiseSetArray . |
| Time | gap (const StatType & stat=StatType::AVG, const Unitless percentile=0.5) const Calculates the gap between rise and set times. |
| std::vector< Time > | get_access_times () const Get a vector of access durations for this rise-set array. |
| std::vector< Time > | get_gap_times () const Get a vector of gap durations for this rise-set array. |
| bool | has_access (const Time & time) const Checks if the given time occurs during an access window. |
| void | insert (const Time & rise, const Time & set) Inserts a rise and set time at the end of the array. |
| Time | mean_time_to_access () const Calculates the mean time to access (MTTA) for this RiseSetArray . |
| RiseSetArray | operator& (const RiseSetArray & other) const Intersection operator to find common rise/set pairs between two RiseSetArray objects. |
| RiseSetArray & | operator&= (const RiseSetArray & other) In-place intersection operator to find common rise/set pairs between two RiseSetArray objects. |
| RiseSetArray | operator- (const RiseSetArray & other) const Difference operator to subtract one RiseSetArray from another. |
| RiseSetArray & | operator-= (const RiseSetArray & other) In-place difference operator to subtract one RiseSetArray from another. |
| RiseSetArray & | operator= (RiseSetArray && other) noexcept Move assignment operator for RiseSetArray . |
| RiseSetArray & | operator= (const RiseSetArray & other) Copy assignment operator for RiseSetArray . |
| bool | operator== (const RiseSetArray & other) const Equality operator to compare two RiseSetArray objects. |
| Time & | operator[] (const std::size_t & ind) Returns a reference to the rise/set pair at the specified index. |
| const Time & | operator[] (const std::size_t & ind) const Returns a const reference to the rise/set pair at the specified index. |
| RiseSetArray | operator| (const RiseSetArray & other) const Union operator to combine two RiseSetArray objects. |
| RiseSetArray & | operator|= (const RiseSetArray & other) In-place union operator to combine two RiseSetArray objects. |
| void | prepend (const Time & rise, const Time & set) Prepends a rise and set time to the array. |
| std::size_t | size () const Returns the number of rise/set pairs in the array. |
| std::vector< std::string > | to_string_vector () const Converts the RiseSetArray to a vector of formatted strings. |
| ~RiseSetArray () = default Destructor for RiseSetArray . |
Detailed Description¶
This class provides functionality to manage and manipulate an array of rise and set times, including operations like addition, subtraction, intersection, and union of rise/set pairs.
Public Types Documentation¶
typedef const_iterator¶
Constant iterator type for the RiseSetArray .
typedef iterator¶
Iterator type for the RiseSetArray .
Public Functions Documentation¶
function RiseSetArray [1/4]¶
Default constructor for RiseSetArray .
Initializes an empty RiseSetArray.
function RiseSetArray [2/4]¶
Constructs a RiseSetArray from a vector of Time objects.
Parameters:
risesetsA vector of Time objects representing rise and set times.
function RiseSetArray [3/4]¶
Copy constructor for RiseSetArray .
Parameters:
otherThe other RiseSetArray to copy from.
function RiseSetArray [4/4]¶
Move constructor for RiseSetArray .
Parameters:
otherThe other RiseSetArray to move from.
function access_time¶
Calculates the access time based on rise and set times.
Time astrea::trace::RiseSetArray::access_time (
const StatType & stat=StatType::AVG,
const Unitless percentile=0.5
) const
Parameters:
statThe statistical measure to calculate (MIN, MEAN, MAX, PCT).percentileThe percentile to calculate if stat is PCT (between 0 and 1).
Returns:
Time The calculated access time based on the specified statistic.
function append¶
Appends a rise and set time to the array.
Parameters:
riseThe rise time to append.setThe set time to append.
Exception:
std::invalid_argumentIf the rise time is not before the set time.std::invalid_argumentIf the rise and set times are not in chronological order.std::invalid_argumentIf the rise and set times are not valid.
function average_daily_vis_time¶
Calculates the average daily visibility time based on the rise and set times.
Returns:
Time The calculated average daily visibility time.
function begin [1/2]¶
Returns an iterator to the beginning of the RiseSetArray .
Returns:
iterator An iterator to the beginning of the RiseSetArray.
function begin [2/2]¶
Returns a constant iterator to the beginning of the RiseSetArray .
Returns:
const_iterator A constant iterator to the beginning of the RiseSetArray.
function cbegin¶
Returns a constant iterator to the beginning of the RiseSetArray .
Returns:
const_iterator A constant iterator to the beginning of the RiseSetArray.
function cend¶
Returns a constant iterator to the end of the RiseSetArray .
Returns:
const_iterator A constant iterator to the end of the RiseSetArray.
function end [1/2]¶
Returns an iterator to the end of the RiseSetArray .
Returns:
iterator An iterator to the end of the RiseSetArray.
function end [2/2]¶
Returns a constant iterator to the end of the RiseSetArray .
Returns:
const_iterator A constant iterator to the end of the RiseSetArray.
function gap¶
Calculates the gap between rise and set times.
Time astrea::trace::RiseSetArray::gap (
const StatType & stat=StatType::AVG,
const Unitless percentile=0.5
) const
Parameters:
statThe statistical measure to calculate (MIN, MEAN, MAX, PCT).percentileThe percentile to calculate if stat is PCT (between 0 and 1).
Returns:
Time The calculated gap based on the specified statistic.
function get_access_times¶
Get a vector of access durations for this rise-set array.
Returns:
std::vector<Time> Vector of access durations in the order that they appear
function get_gap_times¶
Get a vector of gap durations for this rise-set array.
Returns:
std::vector<Time> Vector of gap durations in the order that they appear
function has_access¶
Checks if the given time occurs during an access window.
Parameters:
timeTime to check for access
Returns:
true if time occurs during an access windows
Returns:
false if time occurs during a gap
function insert¶
Inserts a rise and set time at the end of the array.
Parameters:
riseThe rise time to insert.setThe set time to insert.
Exception:
std::invalid_argumentIf the rise time is not before the set time.std::invalid_argumentIf the rise and set times are not in chronological order.std::invalid_argumentIf the rise and set times are not valid.
function mean_time_to_access¶
Calculates the mean time to access (MTTA) for this RiseSetArray .
Returns:
Time The calculated mean time to access based on the rise and set times.
Note:
access: |<gap-->|<access-->|<-gap->|<access-->|... | | | | |... tta: |\ | | | |... |+\ | | | |... |++\ | |\ | |... |+++\ | |+\ | |... |++++\ | |++\ | |... |+++++\ | |+++\ | |... |++++++\ | |++++\ | |... |+++++++\ | |+++++\ | |... |++++++++|____________|++++++|____________|...
MMTA is the mean time to access, or the mean height of the shaded regions MMTA = 0.5 * sqrt(gap0^2 + gap1^2 + ...)
function operator&¶
Intersection operator to find common rise/set pairs between two RiseSetArray objects.
Parameters:
otherThe other RiseSetArray to intersect with this one.
Returns:
RiseSetArray A new RiseSetArray containing the intersection of the two.
function operator&=¶
In-place intersection operator to find common rise/set pairs between two RiseSetArray objects.
Parameters:
otherThe other RiseSetArray to intersect with this one.
Returns:
RiseSetArray& Reference to this RiseSetArray after the intersection.
function operator-¶
Difference operator to subtract one RiseSetArray from another.
Parameters:
otherThe RiseSetArray to subtract from this one.
Returns:
RiseSetArray A new RiseSetArray containing the result of the subtraction.
function operator-=¶
In-place difference operator to subtract one RiseSetArray from another.
Parameters:
otherThe RiseSetArray to subtract from this one.
Returns:
RiseSetArray& Reference to this RiseSetArray after the subtraction.
function operator=¶
Move assignment operator for RiseSetArray .
Parameters:
otherThe other RiseSetArray to move from.
Returns:
RiseSetArray& Reference to this RiseSetArray after the move.
function operator=¶
Copy assignment operator for RiseSetArray .
Parameters:
otherThe other RiseSetArray to copy from.
Returns:
RiseSetArray& Reference to this RiseSetArray after the copy.
function operator==¶
Equality operator to compare two RiseSetArray objects.
Parameters:
otherThe other RiseSetArray to compare against.
Returns:
true If the two RiseSetArray objects are equal.
Returns:
false If the two RiseSetArray objects are not equal.
function operator[]¶
Returns a reference to the rise/set pair at the specified index.
Parameters:
indThe index of the rise/set pair to access.
Returns:
Time& A reference to the rise/set pair at the specified index.
function operator[]¶
Returns a const reference to the rise/set pair at the specified index.
Parameters:
indThe index of the rise/set pair to access.
Returns:
const Time& A const reference to the rise/set pair at the specified index.
function operator|¶
Union operator to combine two RiseSetArray objects.
Parameters:
otherThe other RiseSetArray to combine with this one.
Returns:
RiseSetArray A new RiseSetArray containing the union of the two.
function operator|=¶
In-place union operator to combine two RiseSetArray objects.
Parameters:
otherThe other RiseSetArray to combine with this one.
Returns:
RiseSetArray& Reference to this RiseSetArray after the union.
function prepend¶
Prepends a rise and set time to the array.
Parameters:
riseThe rise time to prepend.setThe set time to prepend.
Exception:
std::invalid_argumentIf the rise time is not before the set time.std::invalid_argumentIf the rise and set times are not in chronological order.std::invalid_argumentIf the rise and set times are not valid.
function size¶
Returns the number of rise/set pairs in the array.
Returns:
std::size_t The number of rise/set pairs.
function to_string_vector¶
Converts the RiseSetArray to a vector of formatted strings.
Returns:
std::vector<std::string> A vector of formatted strings representing the rise and set times.
function ~RiseSetArray¶
Destructor for RiseSetArray .
The documentation for this class was generated from the following file astrea/trace/trace/risesets/RiseSetArray.hpp