MCL
A C++ library mirroring some of the most common Matlab functions.
|
#include "mcltypes.h"
#include "elementaryop.h"
#include "basicop.h"
#include "matrixop.h"
#include <vector>
#include <iostream>
Go to the source code of this file.
Namespaces | |
namespace | mcl |
Functions | |
template<class T > | |
Int | mcl::Length (const std::vector< T > &input) noexcept |
template<class T > | |
std::vector< T > | mcl::Zeros (Int length) noexcept |
template<class T > | |
std::vector< T > | mcl::EmptyVector () noexcept |
template<class T > | |
std::vector< T > | mcl::ZeroPad (const std::vector< T > &input, const Int total_length) noexcept |
template<class T > | |
std::vector< T > | mcl::Multiply (const std::vector< T > &vector, const T gain) noexcept |
void | mcl::Multiply (const Real *input_data, const Int num_samples, const Real gain, Real *output_data) noexcept |
template<> | |
std::vector< Real > | mcl::Multiply (const std::vector< Real > &input, const Real gain) noexcept |
void | mcl::MultiplyAdd (const Real *input_data_mult, const Real gain, const Real *input_data_add, const Int num_samples, Real *output_data) noexcept |
template<class T > | |
std::vector< T > | mcl::Add (const std::vector< T > &vector_a, const T scalar) noexcept |
Real | mcl::Add (const Real *input_data, const Int num_samples) noexcept |
template<class T > | |
std::vector< T > | mcl::Subset (const std::vector< T > &vector, const Int from_index, const Int to_index) noexcept |
template<class T > | |
std::vector< T > | mcl::Concatenate (std::vector< T > vector_a, const std::vector< T > &vector_b) noexcept |
template<class T > | |
std::vector< T > | mcl::UnaryVector (const T &element) noexcept |
template<class T > | |
std::vector< T > | mcl::BinaryVector (const T &element_a, const T &element_b) noexcept |
template<class T > | |
std::vector< T > | mcl::Flip (std::vector< T > vector) noexcept |
template<class T > | |
std::vector< T > | mcl::CircShift (const std::vector< T > &vector, Int num_positions) noexcept |
template<class T > | |
std::vector< T > | mcl::Conv (const std::vector< T > &vector_a, const std::vector< T > &vector_b) noexcept |
template<class T > | |
std::vector< T > | mcl::AddVectors (const std::vector< std::vector< T > > &vectors) noexcept |
template<class T > | |
std::vector< T > | mcl::AddVectors (const std::vector< T > &vector_a, const std::vector< T > &vector_b) noexcept |
template<class T > | |
std::vector< T > | mcl::Interleave (const std::vector< T > &vector_a, const std::vector< T > &vector_b) noexcept |
template<class T > | |
std::vector< T > | mcl::Downsample (const std::vector< T > &vector, const Int downsampling_factor) noexcept |
template<class T > | |
std::vector< T > | mcl::ColonOperator (const Int from, const Int to) noexcept |
std::vector< Real > | mcl::ColonOperator (const Real from, const Real step, const Real to) noexcept |
template<class T > | |
std::vector< T > | mcl::Elements (const std::vector< T > &vector, const Int from_id, const Int to_id) noexcept |
template<class T > | |
std::vector< T > | mcl::GetSegment (const std::vector< T > &vector, const Int subset_id, const Int subset_length, bool zeropad_if_shorter=false) noexcept |
template<class T > | |
T | mcl::Prod (const std::vector< T > &vector) noexcept |
template<class T > | |
T | mcl::Dot (const std::vector< T > &vector_a, const std::vector< T > &vector_b) noexcept |
Real | mcl::Norm (const std::vector< Real > &vector, Real l_norm=2.0) noexcept |
template<class T > | |
void | mcl::Print (const T *vector, const Int num_elements) noexcept |
template<class T > | |
void | mcl::Print (const std::vector< T > &vector) noexcept |
std::vector< Real > | mcl::Ones (Int length) noexcept |
std::vector< Real > | mcl::Hann (const Int length) noexcept |
std::vector< Real > | mcl::Hamming (const Int length) noexcept |
std::vector< Real > | mcl::TukeyWin (const Int length, const Real ratio) noexcept |
std::vector< Real > | mcl::LinSpace (Real min, Real max, Int num_elements) noexcept |
Real | mcl::Sum (const std::vector< Real > &input) noexcept |
Real | mcl::Mean (const std::vector< Real > &input) noexcept |
Real | mcl::Geomean (const std::vector< Real > &input) noexcept |
Real | mcl::Mean (const std::vector< Real > &input, const std::vector< Real > &weigths) noexcept |
Real | mcl::Std (const std::vector< Real > &input) noexcept |
Real | mcl::Var (const std::vector< Real > &input) noexcept |
Real | mcl::Var (const std::vector< Real > &input, const std::vector< Real > &weights) noexcept |
std::vector< std::string > | mcl::Split (const std::string &string, char delim) noexcept |
std::vector< Complex > | mcl::Poly (const std::vector< Complex > roots) noexcept |
std::vector< Complex > | mcl::Poly (const std::vector< Real > roots) noexcept |
bool | mcl::IsNonNegative (const std::vector< Real > &input) noexcept |
bool | mcl::VectorOpTest () |
Matrix< Real > | mcl::Cov (const std::vector< Real > &x, const std::vector< Real > &y) noexcept |
Matrix< Real > | mcl::Cov (const std::vector< std::vector< Real > > &input) noexcept |
Real | mcl::CovElement (const std::vector< Real > &x, const std::vector< Real > &y) noexcept |
std::vector< Real > | mcl::CumSum (const std::vector< Real > &input) noexcept |
std::vector< std::vector< Real > > | mcl::Enframe (const std::vector< Real > &input, const std::vector< Real > &window, const Int frame_increment) noexcept |
std::vector< Real > | mcl::OverlapAdd (const std::vector< std::vector< Real > > &frames, const std::vector< Real > &window, const Int frame_increment) noexcept |
std::vector< Complex > | mcl::ConvertToComplex (std::vector< Real > input) noexcept |