Empirical
|
#include <scales.h>
Public Member Functions | |
Scale () | |
Scale (bool derived) | |
Decoy constructor so we don't construct extra base scales. More... | |
template<typename T , size_t SIZE> | |
Scale & | SetRange (emp::array< T, SIZE > values) |
Scale & | SetRange (double min, double max) |
template<typename T , size_t SIZE> | |
Scale & | SetDomain (emp::array< T, SIZE > values) |
Scale & | SetDomain (double min, double max) |
Scale | Copy () |
Make a copy of this scale. More... | |
double | ApplyScale (double input) |
Calculate the ouput for [input], based on the scale's scaling function. More... | |
int | ApplyScale (int input) |
int | GetID () const |
void | Log () const |
Protected Member Functions | |
Scale (int id) | |
Protected Attributes | |
int | id |
Scales in D3 are functions that take input values and map them to output based on a scaling function. They are often used to map data calues to x, y coordinates in pixels describing where on the screen elements should be placed. This is a base class to inherit from - should never be made stand-alone
|
inlineprotected |
|
inline |
|
inline |
Decoy constructor so we don't construct extra base scales.
|
inline |
Calculate the ouput for [input], based on the scale's scaling function.
|
inline |
|
inline |
Make a copy of this scale.
|
inlineinherited |
|
inlineinherited |
|
inline |
Set the input values corresponding to values in the range. Array should contain same number of elements as the one used to set the range.
|
inline |
|
inline |
Set the output values corresponding to values in the domain. Output for values in between will be interpolated with a function determined by the type of the scale. Array should contain same number of elements as the one used to set the domain.
|
inline |
|
protectedinherited |