LearningRateAlgorithm::Triplet Struct Reference

This structure defines a set of three points (A, U, B) for bracketing a directional minimum. More...

#include <learning_rate_algorithm.h>

Public Member Functions

 Triplet ()
 Default constructor. More...
 
virtual ~Triplet ()
 Destructor. More...
 
bool operator== (const Triplet &other_triplet) const
 
type get_length () const
 
pair< type, type > minimum () const
 
string struct_to_string () const
 Writes a string with the values of A, U and B. More...
 
void print () const
 Prints the triplet points to the standard output. More...
 
void check () const
 

Public Attributes

pair< type, type > A
 Left point of the triplet. More...
 
pair< type, type > U
 Interior point of the triplet. More...
 
pair< type, type > B
 Right point of the triplet. More...
 

Detailed Description

This structure defines a set of three points (A, U, B) for bracketing a directional minimum.

Definition at line 61 of file learning_rate_algorithm.h.

Constructor & Destructor Documentation

◆ Triplet()

Triplet ( )
inline

Default constructor.

Definition at line 65 of file learning_rate_algorithm.h.

◆ ~Triplet()

virtual ~Triplet ( )
inlinevirtual

Destructor.

Definition at line 74 of file learning_rate_algorithm.h.

Member Function Documentation

◆ check()

void check ( ) const
inline

Checks that the points A, U and B define a minimum. That is, a < u < b, fa > fu and fu < fb. If some of that conditions is not satisfied, an exception is thrown.

Definition at line 141 of file learning_rate_algorithm.h.

◆ get_length()

type get_length ( ) const
inline

Definition at line 97 of file learning_rate_algorithm.h.

◆ minimum()

pair< type, type > minimum ( ) const
inline

Definition at line 103 of file learning_rate_algorithm.h.

◆ operator==()

bool operator== ( const Triplet other_triplet) const
inline

Equal to operator. It compares this triplet with another triplet. It returns true if both triplets have the same points A, U and B, and false otherwise. @ param other_triplet Triplet to be compared with.

Definition at line 83 of file learning_rate_algorithm.h.

◆ print()

void print ( ) const
inline

Prints the triplet points to the standard output.

Definition at line 131 of file learning_rate_algorithm.h.

◆ struct_to_string()

string struct_to_string ( ) const
inline

Writes a string with the values of A, U and B.

Definition at line 118 of file learning_rate_algorithm.h.

Member Data Documentation

◆ A

pair<type, type> A

Left point of the triplet.

Definition at line 188 of file learning_rate_algorithm.h.

◆ B

pair<type, type> B

Right point of the triplet.

Definition at line 196 of file learning_rate_algorithm.h.

◆ U

pair<type, type> U

Interior point of the triplet.

Definition at line 192 of file learning_rate_algorithm.h.


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