Construct a matrix
Create a new -by- matrix by passing the number of rows and the number of columns
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | n | The number of rows in |
||
integer, | intent(in) | :: | k | The number of cols in |
Create a new -by- matrix by passing the number of rows and the number of columns
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | n | The number of rows in |
||
integer, | intent(in) | :: | k | The number of cols in |
||
integer, | intent(in) | :: | val |
Create a new -by- matrix by passing the number of rows and the number of columns
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | n | The number of rows in |
||
integer, | intent(in) | :: | k | The number of cols in |
||
real(kind=real32), | intent(in) | :: | val |
Create a new -by- matrix by passing the number of rows and the number of columns
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | n | The number of rows in |
||
integer, | intent(in) | :: | k | The number of cols in |
||
real(kind=real64), | intent(in) | :: | val |
Create a new -by- matrix by passing a rank2 integer array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(in) | :: | m2 |
Create a new -by- matrix by passing a rank2 integer array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | dimension(:,:) | :: | array |
Create a new -by- matrix by passing a rank2 integer array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=real32), | intent(in), | dimension(:,:) | :: | array |
Create a new -by- matrix by passing a rank2 integer array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=real64), | intent(in), | dimension(:,:) | :: | array |
Construct a -by- given a rank1 array of ints
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | dimension(:) | :: | array | ||
integer, | intent(in) | :: | n | |||
integer, | intent(in) | :: | k |
Construct a -by- given a rank1 array of ints
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=real32), | intent(in), | dimension(:) | :: | array | ||
integer, | intent(in) | :: | n | |||
integer, | intent(in) | :: | k |
Construct a -by- given a rank1 array of ints
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=real64), | intent(in), | dimension(:) | :: | array | ||
integer, | intent(in) | :: | n | |||
integer, | intent(in) | :: | k |
Create a new matrix
Wipe the contents of a matrix and allocate the proper amount of space
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(inout) | :: | self | Matrix object to wipe |
||
integer, | intent(in) | :: | n | Dimension of each constituent vector |
||
integer, | intent(in) | :: | k | Number of vectors |
Wipe the contents of a matrix and allocate the proper amount of space
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(inout) | :: | self | Matrix object to wipe |
||
class(matrix), | intent(in) | :: | m2 | Matrix object to wipe |
Clear all of the elements of a matrix
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(inout) | :: | self |
Print the contents of a matrix
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(in) | :: | self |
Get the kth vector in the matrix
Get the element at the index (i, j)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(in) | :: | self | |||
integer, | intent(in) | :: | i | ith element |
||
integer, | intent(in) | :: | j | jth vector |
Compute an otrthonormal basis for the vector space spanned by the columns of a matrix
Check whether a matrix is orthonormal
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(in) | :: | self |
Return a rank2 Fortran array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(in) | :: | self |
Return the number of cols of A
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(in) | :: | self |
Return the number of rows of A
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(in) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(inout) | :: | self | |||
integer, | intent(in) | :: | val |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(inout) | :: | self | |||
real(kind=real32), | intent(in) | :: | val |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(inout) | :: | self | |||
real(kind=real64), | intent(in) | :: | val |
Set the value of (a_{i,j})
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(inout) | :: | self | |||
integer, | intent(in) | :: | i | ith element |
||
integer, | intent(in) | :: | j | jth vector |
||
integer, | intent(in) | :: | x |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(inout) | :: | self | |||
integer, | intent(in) | :: | i | ith element |
||
integer, | intent(in) | :: | j | jth vector |
||
real(kind=real32), | intent(in) | :: | x |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(inout) | :: | self | |||
integer, | intent(in) | :: | i | ith element |
||
integer, | intent(in) | :: | j | jth vector |
||
real(kind=real64), | intent(in) | :: | x |
Assign the contents of a matrix from a rank2 Fortran array
Assign a matrix from a rank2 integer array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(inout) | :: | self | |||
integer, | intent(in), | dimension(:,:) | :: | array |
Assign a matrix from a rank2 single precision real array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(inout) | :: | self | |||
real(kind=real32), | intent(in), | dimension(:,:) | :: | array |
Assign a matrix from a rank2 double precision array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(inout) | :: | self | |||
real(kind=real64), | intent(in), | dimension(:,:) | :: | array |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(inout) | :: | self | |||
class(matrix), | intent(in) | :: | m |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(inout) | :: | self | |||
integer, | intent(in) | :: | i | Row number |
||
integer, | intent(in), | dimension(:) | :: | array |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(inout) | :: | self | |||
integer, | intent(in) | :: | i | Row number |
||
real(kind=real32), | intent(in), | dimension(:) | :: | array |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(inout) | :: | self | |||
integer, | intent(in) | :: | i | Row number |
||
real(kind=real64), | intent(in), | dimension(:) | :: | array |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(inout) | :: | self | |||
integer, | intent(in) | :: | i | Row number |
||
class(vector), | intent(in) | :: | vec |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(inout) | :: | self | |||
integer, | intent(in) | :: | j | Column number |
||
integer, | intent(in), | dimension(:) | :: | array |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(inout) | :: | self | |||
integer, | intent(in) | :: | j | Column number |
||
real(kind=real32), | intent(in), | dimension(:) | :: | array |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(inout) | :: | self | |||
integer, | intent(in) | :: | j | Column number |
||
real(kind=real64), | intent(in), | dimension(:) | :: | array |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(inout) | :: | self | |||
integer, | intent(in) | :: | j | Column number |
||
class(vector), | intent(in) | :: | vec |
Operator interface to add two matrices
As an operator, this procedure is a function which return a new matrix. use the functional operator equivalent, use [[]]
Operator interface to subtract a matrix
As an operator, this procedure is a function which return a new matrix. use the functional operator equivalent, use [[]]
Operator interface to multiply two matrices
As an operator, this procedure is a function which return a new matrix. use the functional operator equivalent, use [[]]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(in) | :: | self | |||
class(matrix), | intent(in) | :: | m2 |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(in) | :: | self | |||
class(vector), | intent(in) | :: | v |
Subroutine interface to add two matrices
This subroutine will alter the passed matrix. To use the functional operator equivalent, use
Subroutine interface to add two matrices
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(inout) | :: | self | |||
class(matrix), | intent(in) | :: | m2 |
Subroutine interface to add two matrices
This subroutine will alter the passed matrix. To use the functional operator equivalent, use
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(inout) | :: | self | |||
integer, | intent(in) | :: | val |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(inout) | :: | self | |||
real(kind=real32), | intent(in) | :: | val |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix), | intent(inout) | :: | self | |||
real(kind=real64), | intent(in) | :: | val |