📄 matrix.cpp
字号:
return false;
}
bool Matrix::Inplace_asin()
{
if( MTX_asin( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_asind()
{
if( MTX_asin( &m_Matrix ) )
{
if( MTX_Multiply_Scalar( &m_Matrix, RAD2DEG ) )
return true;
else
return false;
}
else
{
return false;
}
}
bool Matrix::Inplace_asinh()
{
if( MTX_asinh( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_atan()
{
if( MTX_atan( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_atand()
{
if( MTX_atan( &m_Matrix ) )
{
if( MTX_Multiply_Scalar( &m_Matrix, RAD2DEG ) )
return true;
else
return false;
}
else
{
return false;
}
}
bool Matrix::Inplace_atanh()
{
if( MTX_atanh( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_Sqr()
{
if( MTX_Sqr( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_Sqrt()
{
if( MTX_Sqrt( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_Exp()
{
if( MTX_Exp( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_Ln()
{
if( MTX_Ln( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_Increment()
{
if( MTX_Increment( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_Decrement()
{
if( MTX_Decrement( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_Add( const Matrix &B )
{
if( MTX_Add_Inplace( &m_Matrix, &B.m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_Subtract( const Matrix &B )
{
if( MTX_Subtract_Inplace( &m_Matrix, &B.m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_PreMultiply( const Matrix &B )
{
if( MTX_PreMultiply_Inplace( &m_Matrix, &B.m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_PostMultiply( const Matrix &B )
{
if( MTX_PostMultiply_Inplace( &m_Matrix, &B.m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_DotMultiply( const Matrix &B )
{
if( MTX_DotMultiply_Inplace( &m_Matrix, &B.m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_DotDivide( const Matrix &B )
{
if( MTX_DotDivide_Inplace( &m_Matrix, &B.m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_SortAscending()
{
if( MTX_SortAscending( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_SortDescending()
{
if( MTX_SortDescending( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_SortColumnAscending( const unsigned col )
{
if( MTX_SortColumnAscending( &m_Matrix, col ) )
return true;
else
return false;
}
bool Matrix::Inplace_SortColumnDescending( const unsigned col )
{
if( MTX_SortColumnDescending( &m_Matrix, col ) )
return true;
else
return false;
}
bool Matrix::Inplace_SortColumnIndexed( const unsigned col, Matrix &Index )
{
if( MTX_SortColumnIndexed( &m_Matrix, col, &Index.m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_SortByColumn( const unsigned col )
{
if( MTX_SortByColumn( &m_Matrix, col ) )
return true;
else
return false;
}
bool Matrix::Inplace_Invert()
{
if( MTX_InvertInPlace( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_InvertRobust()
{
if( MTX_InvertInPlaceRobust( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_LowerTriangularInverse()
{
if( MTX_LowerTriangularInverseInplace( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_FFT()
{
if( MTX_FFT_Inplace( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_IFFT()
{
if( MTX_IFFT_Inplace( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Add( const Matrix &B, const Matrix &C )
{
if( MTX_Add( &m_Matrix, &B.m_Matrix, &C.m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Subtract( const Matrix &B, const Matrix &C )
{
if( MTX_Subtract( &m_Matrix, &B.m_Matrix, &C.m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Multiply( const Matrix &B, const Matrix &C )
{
if( MTX_Multiply( &m_Matrix, &B.m_Matrix, &C.m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_abs()
{
if( MTX_Abs( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_colon( double start, double increment, double end )
{
if( MTX_Colon( &m_Matrix, start, increment, end) )
return true;
else
return false;
}
bool Matrix::Inplace_conj()
{
if( MTX_Conjugate( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_cos()
{
if( MTX_cos( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_cosh()
{
if( MTX_cosh( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_cot()
{
if( MTX_cot( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_coth()
{
if( MTX_coth( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_imag()
{
if( MTX_ConvertComplexToImag( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_exp()
{
if( MTX_Exp( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_eye( const unsigned nrows, const unsigned ncols )
{
if( MTX_Eye( &m_Matrix, nrows, ncols ) )
return true;
else
return false;
}
bool Matrix::Inplace_log2()
{
if( MTX_Ln( &m_Matrix ) )
{
if( MTX_Divide_Scalar( &m_Matrix, log(2.0) ) )
return true;
else
return false;
}
else
{
return false;
}
}
bool Matrix::Inplace_log10()
{
if( MTX_Ln( &m_Matrix ) )
{
if( MTX_Divide_Scalar( &m_Matrix, log(10.0) ) )
return true;
else
return false;
}
else
{
return false;
}
}
bool Matrix::Inplace_ones( const unsigned nrows, const unsigned ncols )
{
if( m_Matrix.nrows == nrows && m_Matrix.ncols == ncols && m_Matrix.isReal )
{
if( !MTX_Fill( &m_Matrix, 1.0 ) )
return false;
}
else
{
if( !MTX_Malloc( &m_Matrix, nrows, ncols, TRUE ) )
return false;
if( !MTX_Fill( &m_Matrix, 1.0 ) )
return false;
}
return true;
}
bool Matrix::Inplace_real()
{
if( MTX_ConvertComplexToReal( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_sin()
{
if( MTX_sin( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_sinc()
{
if( MTX_sinc( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_sinh()
{
if( MTX_sinh( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_sqrt()
{
if( MTX_Sqrt( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_tan()
{
if( MTX_tan( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_tanh()
{
if( MTX_tanh( &m_Matrix ) )
return true;
else
return false;
}
bool Matrix::Inplace_zeros( const unsigned nrows, const unsigned ncols )
{
if( m_Matrix.nrows == nrows && m_Matrix.ncols == ncols && m_Matrix.isReal )
{
if( !MTX_Fill( &m_Matrix, 0.0 ) )
return false;
}
else
{
if( !MTX_Malloc( &m_Matrix, nrows, ncols, TRUE ) )
return false;
if( !MTX_Fill( &m_Matrix, 0.0 ) )
return false;
}
return true;
}
bool Matrix::GetStats_MaxAbs(unsigned &row, unsigned &col, double &value )
{
if( MTX_MaxAbsIndex( &m_Matrix, &value, &row, &col ) )
return true;
else
return false;
}
bool Matrix::GetStats_Max(unsigned &row, unsigned &col, double &re, double &im )
{
if( MTX_MaxIndex( &m_Matrix, &re, &im, &row, &col ) )
return true;
else
return false;
}
bool Matrix::GetStats_MaxVal(double &re, double &im )
{
if( MTX_Max( &m_Matrix, &re, &im ) )
return true;
else
return false;
}
bool Matrix::GetStats_MaxAbsCol(const unsigned col, double &value, unsigned &row )
{
if( MTX_MaxAbsColIndex( &m_Matrix, col, &value, &row ) )
return true;
else
return false;
}
bool Matrix::GetStats_MaxCol(const unsigned col, double &re, double &im, unsigned &row )
{
if( MTX_MaxColIndex( &m_Matrix, col, &re, &im, &row ) )
return true;
else
return false;
}
bool Matrix::GetStats_MaxColVal(const unsigned col, double &re, double &im )
{
if( MTX_MaxColumn( &m_Matrix, col, &re, &im ) )
return true;
else
return false;
}
bool Matrix::GetStats_MaxAbsRow(const unsigned row, double &value, unsigned &col )
{
if( MTX_MaxAbsRowIndex( &m_Matrix, row, &value, &col ) )
return true;
else
return false;
}
bool Matrix::GetStats_MaxRow(const unsigned row, double &re, double &im, unsigned &col )
{
if( MTX_MaxRowIndex( &m_Matrix, row, &re, &im, &col ) )
return true;
else
return false;
}
bool Matrix::GetStats_MaxRowVal(const unsigned row, double &re, double &im )
{
if( MTX_MaxRow( &m_Matrix, row, &re, &im ) )
return true;
else
return false;
}
bool Matrix::GetStats_MinAbs(unsigned &row, unsigned &col, double &value )
{
if( MTX_MinAbsIndex( &m_Matrix, &value, &row, &col ) )
return true;
else
return false;
}
bool Matrix::GetStats_Min(unsigned &row, unsigned &col, double &re, double &im )
{
if( MTX_MinIndex( &m_Matrix, &re, &im, &row, &col ) )
return true;
else
return false;
}
bool Matrix::GetStats_MinVal(double &re, double &im )
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -