mutable
A Database System for Research and Fast Prototyping
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | Friends
m::gs::LinearSpace< T > Struct Template Reference

#include <GridSearch.hpp>

Inheritance diagram for m::gs::LinearSpace< T >:
[legend]
Collaboration diagram for m::gs::LinearSpace< T >:
[legend]

Public Types

using value_type = T
 
using difference_type = typename std::conditional_t< std::is_integral_v< T >, std::make_signed< T >, std::common_type< T > >::type
 
using derived_type = LinearSpace< T >
 

Public Member Functions

 LinearSpace (value_type lowest, value_type highest, unsigned num_steps, bool is_ascending=true)
 
value_type lo () const
 
value_type hi () const
 
double step () const
 
unsigned num_steps () const
 
difference_type delta () const
 
bool ascending () const
 
bool descending () const
 
value_type at (unsigned n) const
 
value_type operator() (unsigned n) const
 
std::vector< value_typesequence () const
 
void dump (std::ostream &out) const
 
void dump () const
 

Static Public Member Functions

static LinearSpace Ascending (value_type lowest, value_type highest, unsigned num_steps)
 
static LinearSpace Descending (value_type lowest, value_type highest, unsigned num_steps)
 

Private Attributes

value_type lo_
 
value_type hi_
 
double step_
 
unsigned num_steps_
 
bool is_ascending_
 

Friends

M_LCOV_EXCL_START friend std::ostream & operator<< (std::ostream &out, const LinearSpace &S)
 

Detailed Description

template<typename T>
struct m::gs::LinearSpace< T >

Definition at line 50 of file GridSearch.hpp.

Member Typedef Documentation

◆ derived_type

using m::gs::Space< T, LinearSpace >::derived_type = LinearSpace <T>
inherited

Definition at line 24 of file GridSearch.hpp.

◆ difference_type

template<typename T >
using m::gs::LinearSpace< T >::difference_type = typename std::conditional_t<std::is_integral_v<T>, std::make_signed<T>, std::common_type<T> >::type

Definition at line 54 of file GridSearch.hpp.

◆ value_type

template<typename T >
using m::gs::LinearSpace< T >::value_type = T

Definition at line 53 of file GridSearch.hpp.

Constructor & Destructor Documentation

◆ LinearSpace()

template<typename T >
m::gs::LinearSpace< T >::LinearSpace ( value_type  lowest,
value_type  highest,
unsigned  num_steps,
bool  is_ascending = true 
)
inline

Member Function Documentation

◆ ascending()

template<typename T >
bool m::gs::LinearSpace< T >::ascending ( ) const
inline

Definition at line 93 of file GridSearch.hpp.

References m::gs::LinearSpace< T >::is_ascending_.

Referenced by m::gs::LinearSpace< T >::at().

◆ Ascending()

template<typename T >
static LinearSpace m::gs::LinearSpace< T >::Ascending ( value_type  lowest,
value_type  highest,
unsigned  num_steps 
)
inlinestatic

Definition at line 80 of file GridSearch.hpp.

References m::gs::LinearSpace< T >::num_steps().

◆ at()

template<typename T >
value_type m::gs::LinearSpace< T >::at ( unsigned  n) const
inline

◆ delta()

template<typename T >
difference_type m::gs::LinearSpace< T >::delta ( ) const
inline

◆ descending()

template<typename T >
bool m::gs::LinearSpace< T >::descending ( ) const
inline

Definition at line 94 of file GridSearch.hpp.

References m::gs::LinearSpace< T >::is_ascending_.

◆ Descending()

template<typename T >
static LinearSpace m::gs::LinearSpace< T >::Descending ( value_type  lowest,
value_type  highest,
unsigned  num_steps 
)
inlinestatic

Definition at line 84 of file GridSearch.hpp.

References m::gs::LinearSpace< T >::num_steps().

◆ dump() [1/2]

template<typename T >
void m::gs::LinearSpace< T >::dump ( ) const
inline

Definition at line 131 of file GridSearch.hpp.

References m::gs::LinearSpace< T >::dump().

Referenced by m::gs::LinearSpace< T >::dump().

◆ dump() [2/2]

template<typename T >
void m::gs::LinearSpace< T >::dump ( std::ostream &  out) const
inline

Definition at line 130 of file GridSearch.hpp.

◆ hi()

template<typename T >
value_type m::gs::LinearSpace< T >::hi ( ) const
inline

◆ lo()

template<typename T >
value_type m::gs::LinearSpace< T >::lo ( ) const
inline

◆ num_steps()

template<typename T >
unsigned m::gs::LinearSpace< T >::num_steps ( ) const
inline

◆ operator()()

template<typename T >
value_type m::gs::LinearSpace< T >::operator() ( unsigned  n) const
inline

Definition at line 112 of file GridSearch.hpp.

References m::gs::LinearSpace< T >::at().

◆ sequence()

template<typename T >
std::vector< value_type > m::gs::LinearSpace< T >::sequence ( ) const
inline

◆ step()

template<typename T >
double m::gs::LinearSpace< T >::step ( ) const
inline

Definition at line 90 of file GridSearch.hpp.

References m::gs::LinearSpace< T >::step_.

Referenced by m::gs::LinearSpace< T >::at().

Friends And Related Function Documentation

◆ operator<<

template<typename T >
M_LCOV_EXCL_START friend std::ostream & operator<< ( std::ostream &  out,
const LinearSpace< T > &  S 
)
friend

Definition at line 125 of file GridSearch.hpp.

Field Documentation

◆ hi_

template<typename T >
value_type m::gs::LinearSpace< T >::hi_
private

◆ is_ascending_

template<typename T >
bool m::gs::LinearSpace< T >::is_ascending_
private

◆ lo_

template<typename T >
value_type m::gs::LinearSpace< T >::lo_
private

◆ num_steps_

template<typename T >
unsigned m::gs::LinearSpace< T >::num_steps_
private

◆ step_

template<typename T >
double m::gs::LinearSpace< T >::step_
private

The documentation for this struct was generated from the following file: