convert: Convert weights, as COO matrix, to CSC matrix and weights...

Description Usage Arguments Examples

View source: R/util.r

Description

convert Takes a weights triple (COO matrix) and converts it to a sparse edge-incidence matrix (CSC matrix) and weights vector.

Usage

1

Arguments

W

COO matrix of weights: (i,j,w[ij])

Examples

1
2
3
4
5
6
W <- matrix(0,3,3)
W[1,] <- c(1,2,1)
W[2,] <- c(1,3,2)
W[3,] <- c(2,3,3)

sol <- convert(W)

Example output

Loading required package: Matrix
Loading required package: igraph

Attaching package: 'igraph'

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union

cvxbiclustr documentation built on May 2, 2019, 9:34 a.m.