Support for sparse matrices in package Rcsdp
. The class
simple_triplet_sym_matrix
is defined to provide support
for symmetric sparse matrices. It's definition is copied from the package relations
by Kurt
Hornik. Coercion functions from objects of class matrix
and
classes in the Matrix
hierarchy are provided.
simple_triplet_sym_matrix(i,j,v,n=max(c(i,j)),check.ind=FALSE)
# S3 method for matrix
as.simple_triplet_sym_matrix(x,check.sym=FALSE,...)
# S3 method for simple_triplet_sym_matrix
as.matrix(x,...)
# S3 method for simple_triplet_sym_matrix
as.vector(x,...)
.simple_triplet_zero_sym_matrix(n,mode="double")
.simple_triplet_diag_sym_matrix(x,n)
.simple_triplet_random_sym_matrix(n,occ=.1,nnz=occ*n*(n+1)/2,rfun=rnorm,seed=NULL,...)
TO DO
Row indices of non-zero entries.
Column indices of non-zero entries.
Non-zero entries.
Size of matrix.
Checks that arguments i
and j
indicate entries in the lower triangular part of the matrix. Default FALSE
.
Checks if matrix object is symmetric. Default FALSE
.
Object of class matrix
or simple_triplet_sym_matrix
.
Type of zero matrix to create. Default double
.
Ratio of occupancy of random sparse matrix. Default .1
.
Number of non-zero entries in random sparse matrix. Default corresponds to occ=.1
.
Function to generate random entries in sparse matrix. Default rnorm
.
Random number generator seed. Set by function set.seed
before generating random sparse matrix. Default NULL
.
Arguments passed on to casting functions.
Hector Corrada Bravo
TO DO
TO DO
csdp