AuxPort 0.2
Modules for Audio Software Development
|
This class provide an interface to compute and manage a Pascal Triangle. More...
#include <AuxPascal.h>
Public Types | |
enum | Type { Positive , Negative } |
Type is an enumerator that specifies the type of Pascal Triangle: Positive or Negative. More... | |
Public Member Functions | |
AuxPascal (const AuxPascal &obj)=default | |
std::vector< std::vector< float > > | computePascalTriangle (uint32 N, const Type &type=Type::Positive) |
Computes N'th rows of the pascal triangle and returns a 2-D vector of floats. | |
void | Log () override |
Logs the computed Pascal Triangle. | |
void | writeToFile (const std::string &fileName) |
Writes the computed Pascal Triangle into a textfile. | |
void | readFromFile (const std::string &fileName) |
Reads and loads coefficients of pascal triangle from a textfile. | |
void | logFileInfo () |
Logs the info of last file that was read/written. | |
This class provide an interface to compute and manage a Pascal Triangle.
Definition at line 50 of file AuxPascal.h.
Type is an enumerator that specifies the type of Pascal Triangle: Positive or Negative.
Definition at line 60 of file AuxPascal.h.
AuxPort::AuxPascal::AuxPascal | ( | ) |
Definition at line 4 of file AuxPascal.cpp.
std::vector< std::vector< float > > AuxPort::AuxPascal::computePascalTriangle | ( | uint32 | N, |
const Type & | type = Type::Positive ) |
Computes N'th rows of the pascal triangle and returns a 2-D vector of floats.
N | Number of rows to be computed in the pascal triangle |
type | Type of Pascal Triangle (Positive or Negative) |
Definition at line 13 of file AuxPascal.cpp.
|
overridevirtual |
Logs the computed Pascal Triangle.
Reimplemented from AuxPort::ILog.
Definition at line 41 of file AuxPascal.cpp.
void AuxPort::AuxPascal::logFileInfo | ( | ) |
Logs the info of last file that was read/written.
Definition at line 158 of file AuxPascal.cpp.
void AuxPort::AuxPascal::readFromFile | ( | const std::string & | fileName | ) |
Reads and loads coefficients of pascal triangle from a textfile.
Definition at line 94 of file AuxPascal.cpp.
void AuxPort::AuxPascal::writeToFile | ( | const std::string & | fileName | ) |
Writes the computed Pascal Triangle into a textfile.
Definition at line 62 of file AuxPascal.cpp.