smat: Create a Symmetrix Matrix

Description Usage Arguments Value Examples

View source: R/smat.R

Description

smat takes a vector and creates a symmetrix matrix

Usage

1
smat(blk, p, At, isspM = NULL)

Arguments

blk

Lx2 matrix detailing the type of matrices ("s", "q", "l", "u"), and the size of each matrix

p

Row of blk to be used during matrix creation

At

vector to be turned into a symmetric matrix

isspM

if At is sparse, isspx = 1, 0 otherwise. Default is to assume M is dense.

Value

M

A Symmetric Matrix

Examples

1
2
3
4
5
6
7
y <- c(1,0.00000279, 3.245, 2.140, 2.44, 2.321, 4.566)

blk <- matrix(list(),1,2)
blk[[1,1]] <- "s"
blk[[1,2]] <- 3

P <- smat(blk,1, y)

sdpt3r documentation built on May 2, 2019, 4:19 a.m.