# irfpy.util.graminan¶

Module for Gramian matrix

class irfpy.util.graminan.Graminan(a_m)[source]

Bases: object

Instance granian.

Parameters:

a_m – M arrays with dimension of N. Real space only considered.

Consider 3-D real space (N=3). Take 2 vector (M=2). Then, Graminan can be obtained via

>>> a1 = np.array([1., 0, -2])
>>> a2 = np.array([0, -2., 1])
>>> G2 = Graminan([a1, a2])
>>> print(G2.m)
2
>>> print(G2.n)
3
>>> print(G2.matrix)
[[ 5. -2.]
[-2.  5.]]


Determinant of G highly relate to the area and volume. For this case, only two vector povides only area.

$S = \sqrt{det(G_2)}$

For m=3 case, you can get volume as

$V = \sqrt{det(G_3)}$

Probably for m=4 case, you can get super volume as

$V_4 = \sqrt{det(G_4)}$

These functionalities are implemented as get_volume() function.

get_volume()[source]

Return the volume (generalized).

For m=2 case, area (of trapezoid) is returned. For m=3 case, volume (hexahedron) is returend. Probably for m=4 case, super volume is returend.

irfpy.util.graminan.doctests()[source]