to_ergm_Cdouble {ergm}R Documentation

Methods to serialize objects into numeric vectors for passing to the C side.

Description

These methods return a vector of doubles. For edge lists, this usually takes the form of a 2 e + 1- or 3 e + 1-vector, containing the number of edges followed a column-major serialization of the edgelist matrix.

Usage

to_ergm_Cdouble(x, ...)

## S3 method for class 'network'
to_ergm_Cdouble(x, attrname = NULL, ...)

## S3 method for class 'ergm_state'
to_ergm_Cdouble(x, attrname = NULL, ...)

## S3 method for class 'matrix'
to_ergm_Cdouble(x, prototype = NULL, ...)

## S3 method for class 'rlebdm'
to_ergm_Cdouble(x, ...)

Arguments

x

object to be serialized.

...

arguments for methods.

attrname

name of an edge attribute.

prototype

A network whose relevant attributes (size, directedness, bipartitedness, and presence of loops) are imposed on the output edgelist if x is already an edgelist. (For example, if the prototype is undirected, to_ergm_Cdouble will ensure that t < h.)

Value

The rlebdm method returns a vector with the following:

Methods (by class)


[Package ergm version 4.9.0 Index]