File: matblock.gd

package info (click to toggle)
gap 4r4p9-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 27,120 kB
  • ctags: 6,735
  • sloc: ansic: 96,692; sh: 3,254; makefile: 319; perl: 11; awk: 6
file content (69 lines) | stat: -rw-r--r-- 2,400 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#############################################################################
##
#W  matblock.gd                 GAP Library                  Alexander Hulpke
##
#H  @(#)$Id: matblock.gd,v 4.8 2002/04/15 10:05:00 sal Exp $
##
#Y  Copyright (C)  1997,  Lehrstuhl D fuer Mathematik,  RWTH Aachen,  Germany
#Y  (C) 1998 School Math and Comp. Sci., University of St.  Andrews, Scotland
#Y  Copyright (C) 2002 The GAP Group
##
##  This file contains the declarations for block matrices.
##
Revision.matblock_gd :=
    "@(#)$Id: matblock.gd,v 4.8 2002/04/15 10:05:00 sal Exp $";

#1
##  Block matrices are a special representation of matrices which can save a
##  lot of memory if large matrices have a block structure with lots of zero
##  blocks. {\GAP} uses the representation `IsBlockMatrixRep' to store block
##  matrices.
##  \indextt{IsBlockMatrixRep}


#############################################################################
##
#F  BlockMatrix( <blocks>, <nrb>, <ncb> )
#F  BlockMatrix( <blocks>, <nrb>, <ncb>, <rpb>, <cpb>, <zero> )
##
##  `BlockMatrix' returns an immutable matrix in the sparse representation
##  `IsBlockMatrixRep'.
##  The nonzero blocks are described by the list <blocks> of triples,
##  the matrix has <nrb> row blocks and <ncb> column blocks.
##
##  If <blocks> is empty (i.e., if the matrix is a zero matrix) then
##  the dimensions of the blocks must be entered as <rpb> and <cpb>,
##  and the zero element as <zero>.
##
##  Note that all blocks must be ordinary matrices (see~"IsOrdinaryMatrix"),
##  and also the block matrix is an ordinary matrix.
##
DeclareGlobalFunction( "BlockMatrix" );


#############################################################################
##
#A  MatrixByBlockMatrix( <blockmat> ) . . . create matrix from (block) matrix
##
##  returns a plain ordinary matrix that is equal to the block matrix
##  <blockmat>.
##
DeclareAttribute( "MatrixByBlockMatrix", IsMatrix );
#T ConvertToPlistRep?


#############################################################################
##
#F  AsBlockMatrix( <m>, <nrb>, <ncb> )  . . . create block matrix from matrix
##
##  returns a block matrix with <nrb> row blocks and <ncb> column blocks
##  which is equal to the ordinary matrix <m>.
##
DeclareGlobalFunction( "AsBlockMatrix" );
#T ConvertToBlockMatrixRep?


#############################################################################
##
#E