forked from M-Labs/nalgebra
Name change
This commit is contained in:
parent
fd0398f493
commit
5f3e2f5b45
@ -45,7 +45,7 @@ use lapack;
|
|||||||
)
|
)
|
||||||
)]
|
)]
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct GE<T: Scalar, D: Dim>
|
pub struct GeneralizedEigen<T: Scalar, D: Dim>
|
||||||
where
|
where
|
||||||
DefaultAllocator: Allocator<T, D> + Allocator<T, D, D>,
|
DefaultAllocator: Allocator<T, D> + Allocator<T, D, D>,
|
||||||
{
|
{
|
||||||
@ -56,7 +56,7 @@ where
|
|||||||
vsr: OMatrix<T, D, D>,
|
vsr: OMatrix<T, D, D>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: Scalar + Copy, D: Dim> Copy for GE<T, D>
|
impl<T: Scalar + Copy, D: Dim> Copy for GeneralizedEigen<T, D>
|
||||||
where
|
where
|
||||||
DefaultAllocator: Allocator<T, D, D> + Allocator<T, D>,
|
DefaultAllocator: Allocator<T, D, D> + Allocator<T, D>,
|
||||||
OMatrix<T, D, D>: Copy,
|
OMatrix<T, D, D>: Copy,
|
||||||
@ -64,7 +64,7 @@ where
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: GEScalar + RealField + Copy, D: Dim> GE<T, D>
|
impl<T: GeneralizedEigenScalar + RealField + Copy, D: Dim> GeneralizedEigen<T, D>
|
||||||
where
|
where
|
||||||
DefaultAllocator: Allocator<T, D, D> + Allocator<T, D>,
|
DefaultAllocator: Allocator<T, D, D> + Allocator<T, D>,
|
||||||
{
|
{
|
||||||
@ -170,7 +170,7 @@ where
|
|||||||
);
|
);
|
||||||
lapack_check!(info);
|
lapack_check!(info);
|
||||||
|
|
||||||
Some(GE {
|
Some(GeneralizedEigen {
|
||||||
alphar,
|
alphar,
|
||||||
alphai,
|
alphai,
|
||||||
beta,
|
beta,
|
||||||
@ -300,8 +300,8 @@ where
|
|||||||
* Lapack functions dispatch.
|
* Lapack functions dispatch.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/// Trait implemented by scalars for which Lapack implements the RealField GE decomposition.
|
/// Trait implemented by scalars for which Lapack implements the RealField GeneralizedEigen decomposition.
|
||||||
pub trait GEScalar: Scalar {
|
pub trait GeneralizedEigenScalar: Scalar {
|
||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
fn xggev(
|
fn xggev(
|
||||||
jobvsl: u8,
|
jobvsl: u8,
|
||||||
@ -345,7 +345,7 @@ pub trait GEScalar: Scalar {
|
|||||||
|
|
||||||
macro_rules! real_eigensystem_scalar_impl (
|
macro_rules! real_eigensystem_scalar_impl (
|
||||||
($N: ty, $xggev: path) => (
|
($N: ty, $xggev: path) => (
|
||||||
impl GEScalar for $N {
|
impl GeneralizedEigenScalar for $N {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn xggev(jobvsl: u8,
|
fn xggev(jobvsl: u8,
|
||||||
jobvsr: u8,
|
jobvsr: u8,
|
||||||
|
@ -96,7 +96,7 @@ use num_complex::Complex;
|
|||||||
|
|
||||||
pub use self::cholesky::{Cholesky, CholeskyScalar};
|
pub use self::cholesky::{Cholesky, CholeskyScalar};
|
||||||
pub use self::eigen::Eigen;
|
pub use self::eigen::Eigen;
|
||||||
pub use self::generalized_eigenvalues::GE;
|
pub use self::generalized_eigenvalues::GeneralizedEigen;
|
||||||
pub use self::hessenberg::Hessenberg;
|
pub use self::hessenberg::Hessenberg;
|
||||||
pub use self::lu::{LUScalar, LU};
|
pub use self::lu::{LUScalar, LU};
|
||||||
pub use self::qr::QR;
|
pub use self::qr::QR;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
use na::dimension::Const;
|
use na::dimension::Const;
|
||||||
use na::{DMatrix, OMatrix};
|
use na::{DMatrix, OMatrix};
|
||||||
use nl::GE;
|
use nl::GeneralizedEigen;
|
||||||
use num_complex::Complex;
|
use num_complex::Complex;
|
||||||
use simba::scalar::ComplexField;
|
use simba::scalar::ComplexField;
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ proptest! {
|
|||||||
let b_c = b.clone().map(|x| Complex::new(x, 0.0));
|
let b_c = b.clone().map(|x| Complex::new(x, 0.0));
|
||||||
let n = a.shape_generic().0;
|
let n = a.shape_generic().0;
|
||||||
|
|
||||||
let ge = GE::new(a.clone(), b.clone());
|
let ge = GeneralizedEigen::new(a.clone(), b.clone());
|
||||||
let (vsl,vsr) = ge.clone().eigenvectors();
|
let (vsl,vsr) = ge.clone().eigenvectors();
|
||||||
|
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ proptest! {
|
|||||||
#[test]
|
#[test]
|
||||||
fn ge_static(a in matrix4(), b in matrix4()) {
|
fn ge_static(a in matrix4(), b in matrix4()) {
|
||||||
|
|
||||||
let ge = GE::new(a.clone(), b.clone());
|
let ge = GeneralizedEigen::new(a.clone(), b.clone());
|
||||||
let a_c =a.clone().map(|x| Complex::new(x, 0.0));
|
let a_c =a.clone().map(|x| Complex::new(x, 0.0));
|
||||||
let b_c = b.clone().map(|x| Complex::new(x, 0.0));
|
let b_c = b.clone().map(|x| Complex::new(x, 0.0));
|
||||||
let (vsl,vsr) = ge.eigenvectors();
|
let (vsl,vsr) = ge.eigenvectors();
|
||||||
|
Loading…
Reference in New Issue
Block a user