Arbitrary precision complex ball matrices using Arb¶
AUTHORS:
- Clemens Heuberger (2014-10-25): Initial version.
This is a rudimentary binding to the Arb library; it may be useful to refer to its documentation for more details.
-
class
sage.matrix.matrix_complex_ball_dense.
Matrix_complex_ball_dense
¶ Bases:
sage.matrix.matrix_dense.Matrix_dense
Matrix over a complex ball field. Implemented using the
acb_mat
type of the Arb library.EXAMPLES:
sage: MatrixSpace(CBF, 3)(2) [2.000000000000000 0 0] [ 0 2.000000000000000 0] [ 0 0 2.000000000000000] sage: matrix(CBF, 1, 3, [1, 2, -3]) [ 1.000000000000000 2.000000000000000 -3.000000000000000]
-
charpoly
(var='x', algorithm=None)¶ Compute the characteristic polynomial of this matrix.
EXAMPLES:
sage: from sage.matrix.benchmark import hilbert_matrix sage: mat = hilbert_matrix(5).change_ring(ComplexBallField(10)) sage: mat.charpoly() x^5 + ([-1.8 +/- 0.0258])*x^4 + ([0.3 +/- 0.05...)*x^3 + ([+/- 0.0...])*x^2 + ([+/- 0.0...])*x + [+/- 0.0...]
-
contains
(other)¶ Test if the set of complex matrices represented by
self
is contained in that represented byother
.EXAMPLES:
sage: b = CBF(0, RBF(0, rad=.1r)); b [+/- 0.101]*I sage: matrix(CBF, [0, b]).contains(matrix(CBF, [0, 0])) True sage: matrix(CBF, [0, b]).contains(matrix(CBF, [b, 0])) False sage: matrix(CBF, [b, b]).contains(matrix(CBF, [b, 0])) True
-
determinant
()¶ Compute the determinant of this matrix.
EXAMPLES:
sage: matrix(CBF, [[1/2, 1/3], [1, 1]]).determinant() [0.1666666666666667 +/- ...e-17] sage: matrix(CBF, [[1/2, 1/3], [1, 1]]).det() [0.1666666666666667 +/- ...e-17] sage: matrix(CBF, [[1/2, 1/3]]).determinant() Traceback (most recent call last): ... ValueError: self must be a square matrix
-
exp
()¶ Compute the exponential of this matrix.
EXAMPLES:
sage: matrix(CBF, [[i*pi, 1], [0, i*pi]]).exp() [[-1.00000000000000 +/- ...e-16] + [+/- ...e-16]*I [-1.00000000000000 +/- ...e-16] + [+/- ...e-16]*I] [ 0 [-1.00000000000000 +/- ...e-16] + [+/- ...e-16]*I] sage: matrix(CBF, [[1/2, 1/3]]).exp() Traceback (most recent call last): ... ValueError: self must be a square matrix
-
identical
(other)¶ Test if the corresponding entries of two complex ball matrices represent the same balls.
EXAMPLES:
sage: a = matrix(CBF, [[1/3,2],[3,4]]) sage: b = matrix(CBF, [[1/3,2],[3,4]]) sage: a == b False sage: a.identical(b) True
-
overlaps
(other)¶ Test if two matrices with complex ball entries represent overlapping sets of complex matrices.
EXAMPLES:
sage: b = CBF(0, RBF(0, rad=0.1r)); b [+/- 0.101]*I sage: matrix(CBF, [0, b]).overlaps(matrix(CBF, [b, 0])) True sage: matrix(CBF, [1, 0]).overlaps(matrix(CBF, [b, 0])) False
-
trace
()¶ Compute the trace of this matrix.
EXAMPLES:
sage: matrix(CBF, [[1/3, 1/3], [1, 1]]).trace() [1.333333333333333 +/- ...e-16] sage: matrix(CBF, [[1/2, 1/3]]).trace() Traceback (most recent call last): ... ValueError: self must be a square matrix
-