use std::ffi::CStr;
use crate::{array::Array, error::Result, ops::linalg_full::Uplo};
impl Array {
pub fn inv(&self) -> Result<Array> {
crate::ops::linalg_full::inv(self)
}
pub fn tri_inv(&self, upper: bool) -> Result<Array> {
crate::ops::linalg_full::tri_inv(self, upper)
}
pub fn pinv(&self) -> Result<Array> {
crate::ops::linalg_full::pinv(self)
}
pub fn cholesky_inv(&self, upper: bool) -> Result<Array> {
crate::ops::linalg_full::cholesky_inv(self, upper)
}
pub fn cholesky(&self, upper: bool) -> Result<Array> {
crate::ops::linalg_full::cholesky(self, upper)
}
pub fn qr(&self) -> Result<(Array, Array)> {
crate::ops::linalg_full::qr(self)
}
pub fn svd(&self, compute_uv: bool) -> Result<Vec<Array>> {
crate::ops::linalg_full::svd(self, compute_uv)
}
pub fn lu(&self) -> Result<Vec<Array>> {
crate::ops::linalg_full::lu(self)
}
pub fn lu_factor(&self) -> Result<(Array, Array)> {
crate::ops::linalg_full::lu_factor(self)
}
pub fn solve(&self, b: &Array) -> Result<Array> {
crate::ops::linalg_full::solve(self, b)
}
pub fn solve_triangular(&self, b: &Array, upper: bool) -> Result<Array> {
crate::ops::linalg_full::solve_triangular(self, b, upper)
}
pub fn eig(&self) -> Result<(Array, Array)> {
crate::ops::linalg_full::eig(self)
}
pub fn eigh(&self, uplo: Uplo) -> Result<(Array, Array)> {
crate::ops::linalg_full::eigh(self, uplo)
}
pub fn eigvals(&self) -> Result<Array> {
crate::ops::linalg_full::eigvals(self)
}
pub fn eigvalsh(&self, uplo: Uplo) -> Result<Array> {
crate::ops::linalg_full::eigvalsh(self, uplo)
}
pub fn norm(&self, ord: f64, axis: &[i32], keepdims: bool) -> Result<Array> {
crate::ops::linalg_full::norm(self, ord, axis, keepdims)
}
pub fn norm_matrix(&self, ord: &CStr, axis: &[i32], keepdims: bool) -> Result<Array> {
crate::ops::linalg_full::norm_matrix(self, ord, axis, keepdims)
}
pub fn norm_l2(&self, axis: &[i32], keepdims: bool) -> Result<Array> {
crate::ops::linalg_full::norm_l2(self, axis, keepdims)
}
pub fn cross(&self, b: &Array, axis: i32) -> Result<Array> {
crate::ops::linalg_full::cross(self, b, axis)
}
}