Network: R6Class Network

Description Active bindings Methods

Description

Wrapper class for the network C struct (network.h).

Network object has information about a specific network.

the network ID .c_network External pointer, reference to network C struct. the C network R pointer object check the C network still exists

Active bindings

c_network

the C network R pointer object (SWIG wrapped)

Methods

Public methods


Method new()

Usage
Network$new(model, network_id)
Arguments
model

R6 Model object

network_id

The network ID.


Method n_edges()

Wrapper for C API network_n_edges.

Usage
Network$n_edges()
Returns

Number of edges


Method n_vertices()

Wrapper for C API network_n_vertices.

Usage
Network$n_vertices()
Returns

Number of vertices


Method name()

Wrapper for C API network_name.

Usage
Network$name()
Returns

The network name


Method network_id()

Wrapper for C API get_network_by_id

Usage
Network$network_id()
Returns

The network ID


Method skip_hospitalised()

Wrapper for C API network_skip_hospitalised.

Usage
Network$skip_hospitalised()
Returns

TRUE if interactions are skipped for hospitalised persons.


Method skip_quarantined()

Wrapper for C API network_skip_quarantined.

Usage
Network$skip_quarantined()
Returns

TRUE if interactions are skipped for quarantined persons.


Method type()

Wrapper for C API network_type.

Usage
Network$type()
Returns

Network type: 0 (household), 1 (occupation), or 2 (random)


Method daily_fraction()

Wrapper for C API network_daily_fraction.

Usage
Network$daily_fraction()
Returns

The fraction of edges on the network present each day (i.e. down-sampling the network). Value between 0 and 1.


Method transmission_multiplier()

Wrapper for C API network_transmission_multiplier.

Usage
Network$transmission_multiplier()
Returns

The transmission multiplier for this network


Method set_transmission_multiplier()

Wrapper for C API set_network_transmission_multiplier.

Usage
Network$set_transmission_multiplier(val)
Arguments
val

New tranmission multiplier value to set.

Returns

Sets the transmission multiplier for this network


Method update_daily_fraction()

Wrapper for C API update_daily_fraction.

Usage
Network$update_daily_fraction(daily_fraction)
Arguments
daily_fraction

New fraction value; a value between 0 and 1.

Returns

TRUE on success, FALSE on failure.


Method print()

Print the object

Usage
Network$print()

OpenABMCovid19 documentation built on July 20, 2021, 5:08 p.m.