SuperNN  1.0.0
Public Member Functions | Static Public Member Functions | List of all members
SuperNN::Bounds Struct Reference

Data scaling information, for all input and output neurons. More...

Inheritance diagram for SuperNN::Bounds:
Inheritance graph
[legend]

Public Member Functions

 Bounds ()
 
virtual ~Bounds ()
 
void load_file (std::ifstream &inp)
 Reads the scaling information from a file stream. More...
 
void merge_with (const Bounds &other)
 Merges the values from another Bounds with the current, retaining the limits. More...
 
void save_file (std::ofstream &out) const
 Appends the data bounds values into a file stream. More...
 

Static Public Member Functions

static void load_file (const std::string &path, Bounds &from, Bounds &to)
 Loads from and to bounds from a file. More...
 

Detailed Description

Data scaling information, for all input and output neurons.

Definition at line 47 of file data.hpp.

Constructor & Destructor Documentation

SuperNN::Bounds::Bounds ( )

Definition at line 54 of file data.cpp.

SuperNN::Bounds::~Bounds ( )
virtual

Definition at line 58 of file data.cpp.

Member Function Documentation

void SuperNN::Bounds::load_file ( std::ifstream &  inp)

Reads the scaling information from a file stream.

Parameters
outOutput file stream

Definition at line 83 of file data.cpp.

void SuperNN::Bounds::load_file ( const std::string &  path,
Bounds from,
Bounds to 
)
static

Loads from and to bounds from a file.

Parameters
pathPath to the file with both from and to bounds
fromFrom bounds to be populated
toTo bounds to be populated
Exceptions
Exceptionif it couldn't open the file

Definition at line 94 of file data.cpp.

void SuperNN::Bounds::merge_with ( const Bounds other)

Merges the values from another Bounds with the current, retaining the limits.

Only the caller object is modified. For example, if the bounds { {-10, 10 } ,{5 , 10} } and { { -5, 20} ,{0, 5} } were merged, the result would be { {-10, 20}, {0, 10} }.

Parameters
otherBounds object to merge with

Definition at line 62 of file data.cpp.

void SuperNN::Bounds::save_file ( std::ofstream &  out) const

Appends the data bounds values into a file stream.

Parameters
outOutput file stream

Definition at line 74 of file data.cpp.