Skip to contents

Create a sparse matrix using i, j and x (row indices, column indicies and values respectively) then symmetrizes it with low memory footprint

symmetrize.pmax.sparse symmetrize matrix with max(m[i,j], m[j,i])
symmetrize.pmin.sparse symmetrize matrix with min(m[i,j], m[j,i])

Usage

symmetrize.pmax.sparse(i, j, x, height)

symmetrize.pmin.sparse(i, j, x, height)

Arguments

i

row indices (1-based)

j

column indices (1-based)

x

values such that m[i,j] = x

height

height of the matrix (number of rows)

Value

a symmetric sparse dgCMatrix of size height x height

See also