AuxPort 0.2
Modules for Audio Software Development
|
This class can be used to express continuous mathematical functions as an infinite series of polynomial terms. More...
#include <AuxSeries.h>
Classes | |
struct | TaylorTerms |
TaylorTerms is a struct that represents a polynomial term's exponent and its coefficient. More... | |
Public Types | |
enum | Type { Sin , Cos , Sinh , Cosh , Tanh , ArcTan , E , NaturalLog , Undefined } |
Type is used to specify the mathematical function, the class should compute the series for. More... | |
Public Member Functions | |
AuxSeries (const AuxSeries &obj)=default | |
std::vector< TaylorTerms > & | getTerms (uint32 N, const Type &type=Type::Sin) |
Computes the Taylor Series terms and returns a vector of those terms. | |
void | computeTerms (uint32 N, const Type &type=Type::Sin) |
Computes Taylor Series terms and stores them in a vector internally. | |
Additional Inherited Members | |
![]() | |
enum | Mode { Idle = 0 , Read = 1 , Write = 2 } |
Easy way to specify the Read/Write behavior of the File Stream. More... | |
![]() | |
TextFile ()=default | |
Default Constructor, Initializes the TextFile API. | |
~TextFile ()=default | |
Default Destructor. | |
std::string & | readFileAsString () |
Reads the entire text file and saves it in a String. | |
void | writeLineToFile (const std::string &data, bool log=false) |
Writes a line to the Text File. | |
bool | readLineFromFile (std::string &line, bool log=false) |
Reads a line to the Text File. | |
bool | open (const std::string &fileName, const Mode &mode=Mode::Read, bool log=false) override |
Opens the given file as a text file. | |
bool | close (bool log=false) override |
Closes current text file stream. | |
![]() | |
File (const File &file)=default | |
std::string | getCurrentDirectory () |
Returns the current directory, the program is running in. | |
std::vector< std::string > & | getListOfFiles (const std::string &extension="") |
Returns list of files present in the current directory. | |
void | Log () override |
Override this function to specify logging behavior. | |
![]() | |
void | setColour (const ColourType &colourType) |
This function allows you to set text colour for the text to be printed onto the console. | |
![]() | |
TextFormat (const TextFormat &textFormat)=default | |
void | Log () override |
Implement this method in the derived class to specify logging behaviour. | |
std::string & | getFormatName () |
Return the format name. | |
std::string & | getUniqueIdentifier () |
Return the unique identifier for the text format. | |
std::string & | getExtensionName () |
Returns the extension name. | |
void | setExtensionName (const std::string &extensionName) |
Sets the extension name. | |
void | setUniqueIdentifier (const std::string &uniqueIdentifier) |
Sets the unique identifier for the text format. | |
void | setFormatName (const std::string &formatName) |
Sets the format name. | |
virtual void | read (std::string &line, int props=0)=0 |
Implement this function to specify the read operation for the file. | |
virtual void | write (const std::string &line, int props=0)=0 |
Implement this function to specify the write operation for the file. | |
![]() | |
std::unique_ptr< std::ofstream > | fileWriter |
std::unique_ptr< std::ifstream > | fileReader |
std::string | fileName |
std::string | fileExtension |
std::string | errorMessage |
Mode | mode |
![]() | |
std::string | formatName |
std::string | uniqueIdentifier |
std::string | extensionName |
This class can be used to express continuous mathematical functions as an infinite series of polynomial terms.
Definition at line 50 of file AuxSeries.h.
Type is used to specify the mathematical function, the class should compute the series for.
Definition at line 75 of file AuxSeries.h.
AuxPort::AuxSeries::AuxSeries | ( | ) |
Definition at line 45 of file AuxSeries.cpp.
void AuxPort::AuxSeries::computeTerms | ( | uint32 | N, |
const Type & | type = Type::Sin ) |
Computes Taylor Series terms and stores them in a vector internally.
N | Number of terms to compute |
type | Type of function for which we need to compute Taylor Teries terms |
Definition at line 61 of file AuxSeries.cpp.
std::vector< AuxPort::AuxSeries::TaylorTerms > & AuxPort::AuxSeries::getTerms | ( | uint32 | N, |
const Type & | type = Type::Sin ) |
Computes the Taylor Series terms and returns a vector of those terms.
N | Number of terms to compute |
type | Type of function for which we need to compute Taylor Teries terms |
Definition at line 55 of file AuxSeries.cpp.