KIDS  ver-0.0.1
KIDS : Kernel Integrated Dynamics Simulator
Loading...
Searching...
No Matches
linalg.cpp File Reference
#include "kids/linalg.h"
#include <cmath>
#include <complex>
#include "Eigen/Dense"
#include "Eigen/QR"
#include "kids/Types.h"
Include dependency graph for linalg.cpp:

Go to the source code of this file.

Namespaces

namespace  PROJECT_NS
 < http://warp.povusers.org/FunctionParser/fparser.html
 

Macros

#define EIGEN_NO_STATIC_ASSERT
 
#define EigMajor   Eigen::RowMajor
 

Typedefs

template<class T >
using PROJECT_NS::EigVX = Eigen::Matrix<T, Eigen::Dynamic, 1, EigMajor>
 
template<class T >
using PROJECT_NS::EigMX = Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic, EigMajor>
 
template<class T >
using PROJECT_NS::EigAX = Eigen::Array<T, Eigen::Dynamic, Eigen::Dynamic, EigMajor>
 
using PROJECT_NS::EigVXr = EigVX<kids_real>
 
using PROJECT_NS::EigVXc = EigVX<kids_complex>
 
using PROJECT_NS::EigMXr = EigMX<kids_real>
 
using PROJECT_NS::EigMXc = EigMX<kids_complex>
 
using PROJECT_NS::EigAXr = EigMX<kids_real>
 
using PROJECT_NS::EigAXc = EigMX<kids_complex>
 
using PROJECT_NS::MapVXr = Eigen::Map<EigVXr>
 
using PROJECT_NS::MapVXc = Eigen::Map<EigVXc>
 
using PROJECT_NS::MapMXr = Eigen::Map<EigMXr>
 
using PROJECT_NS::MapMXc = Eigen::Map<EigMXc>
 
using PROJECT_NS::MapAXr = Eigen::Map<EigAXr>
 
using PROJECT_NS::MapAXc = Eigen::Map<EigAXc>
 

Functions

bool PROJECT_NS::ARRAY_ISFINITE (kids_real *A, size_t n)
 Check if all elements of a real array are finite.
 
bool PROJECT_NS::ARRAY_ISFINITE (kids_complex *A, size_t n)
 Check if all elements of a complex array are finite.
 
void PROJECT_NS::ARRAY_CLEAR (kids_int *A, size_t N)
 Set all elements of an integer array to zero.
 
void PROJECT_NS::ARRAY_CLEAR (kids_real *A, size_t N)
 Set all elements of a real array to zero.
 
void PROJECT_NS::ARRAY_CLEAR (kids_complex *A, size_t N)
 Set all elements of a complex array to zero.
 
static void PROJECT_NS::ARRAY_MATMUL_UNIVERSAL (kids_real *A, kids_real *B, kids_real *C, size_t N1, size_t N2, size_t N3, bool ad1=false, bool ad2=false)
 
static void PROJECT_NS::ARRAY_MATMUL_UNIVERSAL (kids_complex *A, kids_complex *B, kids_complex *C, size_t N1, size_t N2, size_t N3, bool ad1=false, bool ad2=false)
 
static void PROJECT_NS::ARRAY_MATMUL_UNIVERSAL (kids_complex *A, kids_real *B, kids_complex *C, size_t N1, size_t N2, size_t N3, bool ad1=false, bool ad2=false)
 
static void PROJECT_NS::ARRAY_MATMUL_UNIVERSAL (kids_complex *A, kids_complex *B, kids_real *C, size_t N1, size_t N2, size_t N3, bool ad1=false, bool ad2=false)
 
void PROJECT_NS::ARRAY_MATMUL (kids_real *A, kids_real *B, kids_real *C, size_t N1, size_t N2, size_t N3)
 Perform matrix multiplication where A = B * C for real matrices.
 
void PROJECT_NS::ARRAY_MATMUL (kids_complex *A, kids_complex *B, kids_complex *C, size_t N1, size_t N2, size_t N3)
 Perform matrix multiplication where A = B * C for complex matrices.
 
void PROJECT_NS::ARRAY_MATMUL (kids_complex *A, kids_real *B, kids_complex *C, size_t N1, size_t N2, size_t N3)
 Perform matrix multiplication where A = B * C for complex and real matrices.
 
void PROJECT_NS::ARRAY_MATMUL (kids_complex *A, kids_complex *B, kids_real *C, size_t N1, size_t N2, size_t N3)
 Perform matrix multiplication where A = B * C for complex and real matrices.
 
void PROJECT_NS::ARRAY_MATMUL_TRANS1 (kids_real *A, kids_real *B, kids_real *C, size_t N1, size_t N2, size_t N3)
 Perform matrix multiplication where A = B^T * C for real matrices.
 
void PROJECT_NS::ARRAY_MATMUL_TRANS1 (kids_complex *A, kids_complex *B, kids_complex *C, size_t N1, size_t N2, size_t N3)
 Perform matrix multiplication where A = B^T * C for complex matrices.
 
void PROJECT_NS::ARRAY_MATMUL_TRANS1 (kids_complex *A, kids_real *B, kids_complex *C, size_t N1, size_t N2, size_t N3)
 Perform matrix multiplication where A = B^T * C for complex and real matrices.
 
void PROJECT_NS::ARRAY_MATMUL_TRANS1 (kids_complex *A, kids_complex *B, kids_real *C, size_t N1, size_t N2, size_t N3)
 Perform matrix multiplication where A = B^T * C for complex and real matrices.
 
void PROJECT_NS::ARRAY_MATMUL_TRANS2 (kids_real *A, kids_real *B, kids_real *C, size_t N1, size_t N2, size_t N3)
 Perform matrix multiplication where A = B * C^T for real matrices.
 
void PROJECT_NS::ARRAY_MATMUL_TRANS2 (kids_complex *A, kids_complex *B, kids_complex *C, size_t N1, size_t N2, size_t N3)
 Perform matrix multiplication where A = B * C^T for complex matrices.
 
void PROJECT_NS::ARRAY_MATMUL_TRANS2 (kids_complex *A, kids_real *B, kids_complex *C, size_t N1, size_t N2, size_t N3)
 Perform matrix multiplication where A = B * C^T for complex and real matrices.
 
void PROJECT_NS::ARRAY_MATMUL_TRANS2 (kids_complex *A, kids_complex *B, kids_real *C, size_t N1, size_t N2, size_t N3)
 Perform matrix multiplication where A = B * C^T for complex and real matrices.
 
void PROJECT_NS::ARRAY_OUTER_TRANS2 (kids_real *A, kids_real *B, kids_real *C, size_t N1, size_t N2)
 Perform outer product with transpose where A = B^T * C for real matrices.
 
void PROJECT_NS::ARRAY_OUTER_TRANS2 (kids_complex *A, kids_complex *B, kids_complex *C, size_t N1, size_t N2)
 Perform outer product with transpose where A = B^T * C for complex matrices.
 
void PROJECT_NS::ARRAY_MATMUL3_TRANS1 (kids_real *A, kids_real *B, kids_real *C, kids_real *D, size_t N1, size_t N2, size_t N0, size_t N3)
 Perform matrix multiplication where A = B^T * C * D for real matrices.
 
void PROJECT_NS::ARRAY_MATMUL3_TRANS1 (kids_complex *A, kids_complex *B, kids_complex *C, kids_complex *D, size_t N1, size_t N2, size_t N0, size_t N3)
 Perform matrix multiplication where A = B^T * C * D for complex matrices.
 
void PROJECT_NS::ARRAY_MATMUL3_TRANS1 (kids_complex *A, kids_real *B, kids_complex *C, kids_real *D, size_t N1, size_t N2, size_t N0, size_t N3)
 Perform matrix multiplication where A = B^T * C * D for complex and real matrices.
 
void PROJECT_NS::ARRAY_MATMUL3_TRANS1 (kids_complex *A, kids_complex *B, kids_real *C, kids_complex *D, size_t N1, size_t N2, size_t N0, size_t N3)
 Perform matrix multiplication where A = B^T * C * D for complex and real matrices.
 
void PROJECT_NS::ARRAY_MATMUL3_TRANS2 (kids_real *A, kids_real *B, kids_real *C, kids_real *D, size_t N1, size_t N2, size_t N0, size_t N3)
 Perform matrix multiplication where A = B * C * D^T for real matrices.
 
void PROJECT_NS::ARRAY_MATMUL3_TRANS2 (kids_complex *A, kids_complex *B, kids_complex *C, kids_complex *D, size_t N1, size_t N2, size_t N0, size_t N3)
 Perform matrix multiplication where A = B * C * D^T for complex matrices.
 
void PROJECT_NS::ARRAY_MATMUL3_TRANS2 (kids_complex *A, kids_real *B, kids_complex *C, kids_real *D, size_t N1, size_t N2, size_t N0, size_t N3)
 Perform matrix multiplication where A = B * C * D^T for complex and real matrices.
 
void PROJECT_NS::ARRAY_MATMUL3_TRANS2 (kids_complex *A, kids_complex *B, kids_real *C, kids_complex *D, size_t N1, size_t N2, size_t N0, size_t N3)
 Perform matrix multiplication where A = B * C * D^T for complex and real matrices.
 
kids_real PROJECT_NS::ARRAY_TRACE2 (kids_real *B, kids_real *C, size_t N1, size_t N2)
 Compute the trace of the matrix product B * C for real matrices.
 
kids_complex PROJECT_NS::ARRAY_TRACE2 (kids_complex *B, kids_complex *C, size_t N1, size_t N2)
 Compute the trace of the matrix product B * C for complex matrices.
 
kids_complex PROJECT_NS::ARRAY_TRACE2 (kids_complex *B, kids_real *C, size_t N1, size_t N2)
 Compute the trace of the matrix product B * C for complex and real matrices.
 
kids_complex PROJECT_NS::ARRAY_TRACE2 (kids_real *B, kids_complex *C, size_t N1, size_t N2)
 Compute the trace of the matrix product B * C for real and complex matrices.
 
kids_real PROJECT_NS::ARRAY_TRACE2_DIAG (kids_real *B, kids_real *C, size_t N1, size_t N2)
 Compute the trace of the diagonal elements of the matrix product B * C for real matrices.
 
kids_complex PROJECT_NS::ARRAY_TRACE2_DIAG (kids_complex *B, kids_complex *C, size_t N1, size_t N2)
 Compute the trace of the diagonal elements of the matrix product B * C for complex matrices.
 
kids_complex PROJECT_NS::ARRAY_TRACE2_DIAG (kids_complex *B, kids_real *C, size_t N1, size_t N2)
 Compute the trace of the diagonal elements of the matrix product B * C for complex and real matrices.
 
kids_complex PROJECT_NS::ARRAY_TRACE2_DIAG (kids_real *B, kids_complex *C, size_t N1, size_t N2)
 Compute the trace of the diagonal elements of the matrix product B * C for real and complex matrices.
 
kids_real PROJECT_NS::ARRAY_TRACE2_OFFD (kids_real *B, kids_real *C, size_t N1, size_t N2)
 Compute the trace of the off-diagonal elements of the matrix product B * C for real matrices.
 
kids_complex PROJECT_NS::ARRAY_TRACE2_OFFD (kids_complex *B, kids_complex *C, size_t N1, size_t N2)
 Compute the trace of the off-diagonal elements of the matrix product B * C for complex matrices.
 
kids_complex PROJECT_NS::ARRAY_TRACE2_OFFD (kids_complex *B, kids_real *C, size_t N1, size_t N2)
 Compute the trace of the off-diagonal elements of the matrix product B * C for complex and real matrices.
 
kids_complex PROJECT_NS::ARRAY_TRACE2_OFFD (kids_real *B, kids_complex *C, size_t N1, size_t N2)
 Compute the trace of the off-diagonal elements of the matrix product B * C for real and complex matrices.
 
kids_real PROJECT_NS::ARRAY_INNER_TRANS1 (kids_real *B, kids_real *C, size_t N1)
 Compute the inner product of the transpose of B with C for real matrices.
 
kids_complex PROJECT_NS::ARRAY_INNER_TRANS1 (kids_complex *B, kids_complex *C, size_t N1)
 Compute the inner product of the conjugate transpose of B with C for complex matrices.
 
kids_complex PROJECT_NS::ARRAY_INNER_TRANS1 (kids_complex *B, kids_real *C, size_t N1)
 Compute the inner product of the conjugate transpose of B with C for complex and real matrices.
 
kids_complex PROJECT_NS::ARRAY_INNER_TRANS1 (kids_real *B, kids_complex *C, size_t N1)
 Compute the inner product of the transpose of B with C for real and complex matrices.
 
kids_real PROJECT_NS::ARRAY_INNER_VMV_TRANS1 (kids_real *B, kids_real *C, kids_real *D, size_t N1, size_t N2)
 Compute the inner product of the transpose of the real vector B with the matrix C, element-wise multiplication with the real vector D.
 
kids_complex PROJECT_NS::ARRAY_INNER_VMV_TRANS1 (kids_complex *B, kids_complex *C, kids_complex *D, size_t N1, size_t N2)
 Compute the inner product of the conjugate transpose of the complex vector B with the complex matrix C, element-wise multiplication with the complex vector D.
 
kids_complex PROJECT_NS::ARRAY_INNER_VMV_TRANS1 (kids_complex *B, kids_real *C, kids_complex *D, size_t N1, size_t N2)
 Compute the inner product of the conjugate transpose of the complex vector B with the real matrix C, element-wise multiplication with the complex vector D.
 
kids_complex PROJECT_NS::ARRAY_INNER_VMV_TRANS1 (kids_real *B, kids_complex *C, kids_real *D, size_t N1, size_t N2)
 Compute the inner product of the transpose of the real vector B with the complex matrix C, element-wise multiplication with the real vector D.
 
void PROJECT_NS::ARRAY_EYE (kids_real *A, size_t n)
 Generate an identity matrix of size n for real numbers.
 
void PROJECT_NS::ARRAY_EYE (kids_complex *A, size_t n)
 Generate an identity matrix of size n for complex numbers.
 
void PROJECT_NS::ARRAY_MAT_DIAG (kids_real *A, kids_real *B, size_t N1)
 Copy the diagonal elements from matrix B to matrix A for real matrices.
 
void PROJECT_NS::ARRAY_MAT_DIAG (kids_complex *A, kids_complex *B, size_t N1)
 Copy the diagonal elements from matrix B to matrix A for complex matrices.
 
void PROJECT_NS::ARRAY_MAT_DIAG (kids_complex *A, kids_real *B, size_t N1)
 Copy the diagonal elements from matrix B to matrix A for complex and real matrices.
 
void PROJECT_NS::ARRAY_MAT_OFFD (kids_real *A, kids_real *B, size_t N1)
 Copy the off-diagonal elements from matrix B to matrix A for real matrices.
 
void PROJECT_NS::ARRAY_MAT_OFFD (kids_complex *A, kids_complex *B, size_t N1)
 Copy the off-diagonal elements from matrix B to matrix A for complex matrices.
 
void PROJECT_NS::ARRAY_MAT_OFFD (kids_complex *A, kids_real *B, size_t N1)
 Copy the off-diagonal elements from matrix B to matrix A for complex and real matrices.
 
void PROJECT_NS::ARRAY_TRANSPOSE (kids_real *A, size_t N1, size_t N2)
 
void PROJECT_NS::ARRAY_TRANSPOSE (kids_complex *A, size_t N1, size_t N2)
 

Macro Definition Documentation

◆ EIGEN_NO_STATIC_ASSERT

#define EIGEN_NO_STATIC_ASSERT

Definition at line 6 of file linalg.cpp.

◆ EigMajor

#define EigMajor   Eigen::RowMajor

Definition at line 12 of file linalg.cpp.