Title: | Symbolic Representation of Matrix Determinant |
---|---|
Description: | Creates a numeric guide for writing the formula for the determinant of a square matrix (a detguide) as a function of the elements of the matrix and writes out that formula, the symbolic representation. |
Authors: | William Fairweather [aut, cre] |
Maintainer: | William Fairweather <[email protected]> |
License: | MIT + file LICENSE |
Version: | 2.0.0 |
Built: | 2025-03-07 03:33:49 UTC |
Source: | https://github.com/cran/SymbolicDeterminants |
A determinant guide is a list of 2 levels, each of which contains a list of p!/2 levels, which codes the use of each element of a pxp matrix in the calculation of the determinant of that matrix. From the guide, the symbolic representation of the determinant can be produced directly.
anewdetguide(p,storage,verbose=TRUE)
anewdetguide(p,storage,verbose=TRUE)
p |
Size of matrix (pxp) |
storage |
Name of directory where detguides are stored. |
verbose |
Logical. TRUE causes printing of function ID before and after running |
Each determinant guide (detguide) is created by cofactor expansion from the detguide of the next smaller square matrix. If p is set larger than any existing detguide, all lower detguides larger than the largest existing one are first created in turn.
"list"
comp1 |
Products in determinant with +1 coefficient |
comp2 |
Products in determinant with -1 coefficient |
William R. Fairweather
anewdetguide(p=5,storage=tempdir(),verbose=TRUE)
anewdetguide(p=5,storage=tempdir(),verbose=TRUE)
A minidetguide is a series of p directories, each of which contains a matrix of size (p-1) x (p-1)!/2, which codes the use of each element of a pxp matrix in the calculation of the determinant of that matrix. From the minidetguide, the symbolic representation of the determinant can be produced directly.
anewminidet(p,storage,cols,verbose=TRUE)
anewminidet(p,storage,cols,verbose=TRUE)
p |
Size of matrix (pxp) |
storage |
Name of directory where detguides are stored. |
cols |
Numbers of columns to be created. Default is 1:p, indicating all columns |
verbose |
Logical. TRUE causes printing of function ID before and after running |
Each determinant guide (minidetguide) is created by creating the set of all possible permutations of the numbers 1 through p except j and storing them as a matrix in subdirectory R1Cj. This represents the set of columns corresponding to rows 2 through p of the products with leading element 1,j of the determinant.
matrix described in details above
William R. Fairweather
anewminidet(p=5,storage=tempdir(),cols=1:5,verbose=TRUE)
anewminidet(p=5,storage=tempdir(),cols=1:5,verbose=TRUE)
Compares the determinant calculated by multiplying eigenvalues of a matrix to that calculated by applying the symbolic representation created by this package.
confirm.det(x=NULL, p, storage, verbose=TRUE)
confirm.det(x=NULL, p, storage, verbose=TRUE)
x |
a user-defined matrix, or NULL |
p |
size of matrix (pxp) for which a detguide has been prepared |
storage |
Quoted name of directory from which to get detguide |
verbose |
Logical. T causes printing of function ID before and after running |
Determinant of x produced obtained by multiplying its eigenvalues and determinant of x obtained by applying the detguide defined by p
William R. Fairweather
confirm.det(x=NULL, p=5,storage=tempdir(),verbose=TRUE)
confirm.det(x=NULL, p=5,storage=tempdir(),verbose=TRUE)
Compares the determinant calculated by multiplying eigenvalues of a matrix to that calculated by applying the symbolic representation created by this package
confirm.minidet(x=NULL, p, storage, verbose=TRUE)
confirm.minidet(x=NULL, p, storage, verbose=TRUE)
x |
a user-defined matrix, or NULL |
p |
size of matrix (pxp) for which a detguide has been prepared |
storage |
Quoted name of directory from which to get detguide |
verbose |
Logical. T causes printing of function ID before and after running |
Determinantof x produced obtained by multiplying its eigenvalues and determinant of x obtained by applying the minidetguide defined by p
William R. Fairweather
confirm.minidet(x=NULL, p=5,storage=tempdir(),verbose=TRUE)
confirm.minidet(x=NULL, p=5,storage=tempdir(),verbose=TRUE)
Produces a table of existing detguides and parsed detguides for all p or a list of minidetguides and parsed minidetguides for a particular p
detindex(storage, mini=c("B","D","M"), pmini=1, verbose=TRUE)
detindex(storage, mini=c("B","D","M"), pmini=1, verbose=TRUE)
storage |
Quoted name of storage directory |
mini |
Index includes (B)oth detguides and minidetguides, (D)etguides only, (M)inidetguides only |
pmini |
p for minidetguides and related files; ignored if mini='D' |
verbose |
Logical. TRUE causes printing of function ID before and after running |
Provide full path in storage. Example: storage="c:/determinants". If storage directory "name" is in same folder as R Workspace, storage="./name" is sufficient.
Detguides |
Table of existing detguides and existing results of parsing the detguides for each p in the storage directory |
Minidetguides |
Table of existing minidetguides and existing results of parsing the minidetguides for p=pmini |
Call |
Call to this function |
William R. Fairweather
detindex(storage=tempdir(),mini="B",pmini=5,verbose=TRUE)
detindex(storage=tempdir(),mini="B",pmini=5,verbose=TRUE)
Produces symbolic (textual) representation of determinant of pxp matrix from previously defined determinant guide (detguide) for that matrix
parsedetguide(p, storage, browser="C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe", symmetric=FALSE, verbose=TRUE)
parsedetguide(p, storage, browser="C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe", symmetric=FALSE, verbose=TRUE)
p |
Size of matrix (pxp) |
storage |
Name of directory where detguide is stored |
browser |
Name of program to be used as HTML browser |
symmetric |
Logical. T causes printing of determinant for symmetric matrix |
verbose |
Logical. TRUE causes printing of function ID before and after running |
Returns symbolic representation to screen and to existing external storage.
William R. Fairweather
## Not run: parsedetguide(p=5, storage=tempdir(), browser="C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe", symmetric=FALSE,verbose=TRUE) ## End(Not run)
## Not run: parsedetguide(p=5, storage=tempdir(), browser="C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe", symmetric=FALSE,verbose=TRUE) ## End(Not run)
Produces symbolic (textual) representation of determinant of pxp matrix from previously defined determinant guide (minidetguide) for that matrix
parsemini(p, storage, symmetric, cols=1:p, verbose=TRUE)
parsemini(p, storage, symmetric, cols=1:p, verbose=TRUE)
p |
Size of matrix (pxp) |
storage |
Name of directory where detguide is stored |
symmetric |
Logical. T causes printing of determinant for symmetric matrix |
cols |
Column numbers of minidetguide to be calculated. Default (1:p) causes all to be calculated |
verbose |
Logical. TRUE causes printing of function ID before and after running |
Returns symbolic representation to screen and to existing external storage.
William R. Fairweather
parsemini(p=5, storage=tempdir(), symmetric=FALSE,cols=1:5, verbose=TRUE)
parsemini(p=5, storage=tempdir(), symmetric=FALSE,cols=1:5, verbose=TRUE)
In order to anticipate the impact of p on calculation time and storage, some indication can be found from size.predictor( ).
predictor(p,verbose=TRUE)
predictor(p,verbose=TRUE)
p |
Size of matrix (pxp) |
verbose |
Logical. TRUE causes printing of function ID before and after running |
Provide full path in storage, using double backslashes. Example: storage="c:\determinants". If storage directory is in same folder as R Workspace, storage=".\name" is sufficient.
Summary of calculations in other functions of this package and their relationship to p, including the number of levels of positive terms and of negative terms, the number of elements of the matrix in each term of the determinant, and the number of lines of text required for the symbolic representation of the determinant.
William R. Fairweather
predictor(p=10,verbose=TRUE)
predictor(p=10,verbose=TRUE)
Retrieves a specified file from storage directory
retrieve(p, storage, browser="C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe", verbose=TRUE)
retrieve(p, storage, browser="C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe", verbose=TRUE)
p |
Size of matrix (pxp) |
storage |
Quoted name of directory for storage of detguides |
browser |
Name of program to be used as HTML browser |
verbose |
Logical. TRUE causes printing of program ID before and after running |
Provide full path to storage. Example: storage="c:/determinants". File to be retrieved is indicated interactively from console.
Selects and retrieves a detguide file from the storage/p/ subdirectory or displays the symbolic determinant in an HTML editor
William R. Fairweather
## Not run: retrieve(p=5,storage=tempdir(), browser="C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe", verbose=TRUE) ## End(Not run)
## Not run: retrieve(p=5,storage=tempdir(), browser="C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe", verbose=TRUE) ## End(Not run)
Retrieves a specified file from storage directory
retrieve.mini(p, storage, browser="C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe", verbose=TRUE)
retrieve.mini(p, storage, browser="C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe", verbose=TRUE)
p |
Size of matrix (pxp) |
storage |
Quoted name of directory for storage of detguides |
browser |
Name of program to be used as HTML browser |
verbose |
Logical. TRUE causes printing of program ID before and after running |
Provide full path in storage. Example: storage="c:/determinants". File to be retrieved is indicated interactively from console.
Selects and retrieves a minidetguide file from the storage/p/ subdirectory or displays the symbolic determinant in an HTML editor
William R. Fairweather
## Not run: retrieve.mini(p=5,storage=tempdir(), browser="C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe", verbose=TRUE) ## End(Not run)
## Not run: retrieve.mini(p=5,storage=tempdir(), browser="C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe", verbose=TRUE) ## End(Not run)