Skip to contents

Serialises the Rust neighbour graph of a SingleCellConnectivity into a raw vector, which survives saveRDS() and qs2 where the pointer does not. The build method rides along as the attribute method. Read it back with from_bytes().

Usage

to_bytes(x, ...)

# S3 method for class 'SingleCellConnectivity'
to_bytes(x, ...)

Arguments

x

A SingleCellConnectivity.

...

Other parameters.

Value

A raw vector.

Examples

conn <- as_sc_connectivity(igraph::make_graph("Zachary"))
bytes <- to_bytes(conn)
from_bytes(bytes)
#> SingleCellConnectivity: 34 cells, 78 edges
#>   Method: NA