-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如何实现复数矩阵的特征向量 #23
Comments
你好,很抱歉现在才看到您的消息,框架目前提供了复数矩阵!!! |
您可以使用 您使用 1.42 版本可以直接通过 MatrixFactory matrixFactory = AlgorithmStar.matrixFactory();
ComplexNumberMatrix complexNumbers = matrixFactory.parseComplexNumberMatrix(
new String[]{
"1 + 2i", "2 + 4i", "3 + 5i", "4 + 6i", "5 + 7i"
},
new String[]{
"1 + 2i", "2 + 4i", "3 + 5i", "4 + 6i", "5 + 7i"
}
);
System.out.println(complexNumbers); |
作者您好, |
package org.example;
import io.github.beardedManZhao.algorithmStar.core.AlgorithmStar;
import io.github.beardedManZhao.algorithmStar.core.MatrixFactory;
import io.github.beardedManZhao.algorithmStar.operands.matrix.ComplexNumberMatrix;
public class Main {
public static void main(String[] args) throws CloneNotSupportedException {
MatrixFactory matrixFactory = AlgorithmStar.matrixFactory();
ComplexNumberMatrix complexNumbers = matrixFactory.parseComplexNumberMatrix(
new String[]{
"1 + 2i", "2 + 4i", "3 + 5i", "4 + 6i", "5 + 7i"
},
new String[]{
"1 + 2i", "2 + 4i", "3 + 5i", "4 + 6i", "5 + 7i"
}
);
ComplexNumberMatrix clone = (ComplexNumberMatrix) complexNumbers.clone();
System.out.println(complexNumbers);
// 加减运算(还有很多没展示)
ComplexNumberMatrix add = complexNumbers.add(clone);
System.out.println(add);
ComplexNumberMatrix diff = complexNumbers.diff(clone);
System.out.println(diff);
// 转换运算(还有很多没展示 这里只是一个共轭处理 以及一个转置)
ComplexNumberMatrix conjugate = complexNumbers.conjugate();
System.out.println(conjugate);
ComplexNumberMatrix transpose = complexNumbers.transpose();
System.out.println(transpose);
}
} |
复数矩阵的特征向量,使用该框架具体是怎么实现? |
您可以创建一个只有一行的复数矩阵,并结合上面的例子就可以了,矩阵如果只有一行或一列,其就可以在大多数情况被做为向量计算 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
如题,您的框架能否实现复数矩阵的特征向量?
The text was updated successfully, but these errors were encountered: