% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/class_spflow_network_pair.R
\docType{class}
\name{spflow_network_pair-class}
\alias{spflow_network_pair-class}
\alias{dat,spflow_network_pair-method}
\alias{dat<-,spflow_network_pair-method}
\alias{id,spflow_network_pair-method}
\alias{id<-,spflow_network_pair-method}
\alias{npairs,spflow_network_pair-method}
\alias{nnodes,spflow_network_pair-method}
\alias{update_dat,spflow_network_pair-method}
\title{Class spflow_network_pair}
\usage{
\S4method{dat}{spflow_network_pair}(object)

\S4method{dat}{spflow_network_pair}(object, ...) <- value

\S4method{id}{spflow_network_pair}(object)

\S4method{id}{spflow_network_pair}(object, ..., which = "pair") <- value

\S4method{npairs}{spflow_network_pair}(object)

\S4method{nnodes}{spflow_network_pair}(object)

\S4method{update_dat}{spflow_network_pair}(object, new_dat)
}
\arguments{
\item{object}{A spflow_network_pair-class}

\item{value}{An object to replace the existing id/data}

\item{which}{A character indicating which of the ids to change, should be one of
\code{c("origin", "destination", "pair")}.
The first characters may be used as shortcuts.}

\item{new_dat}{A data.frame}
}
\description{
An S4 class which holds information on origin-destination (OD) pairs.
Each OD pair is composed of two nodes, each belonging to one network.
All origin nodes must belong to the same origin network should be contained
in one \code{\link[=spflow_network-class]{spflow_network-class()}} - and likewise for the destinations.
}
\section{Slots}{

\describe{
\item{\code{id_net_pair}}{A character identifying the set of origin-destination pairs}

\item{\code{id_orig_net}}{A character that serves as identifier for the origin nodes}

\item{\code{id_dest_net}}{A character that serves as identifier for the destination network}

\item{\code{pair_data}}{A data.frame containing information on origin-destination pairs}
}}

\examples{
## access the data describing the node pairs
net_pair_ge_ge <- pull_member(multi_net_usa_ge,"ge_ge")
dat(net_pair_ge_ge)

## access the id of a network pair
net_pair_ge_ge <- pull_member(multi_net_usa_ge,"ge_ge")
id(net_pair_ge_ge)

## access the number of node pairs in a network pair
net_pair_ge_ge <- pull_member(multi_net_usa_ge,"ge_ge")
npairs(net_pair_ge_ge)

## access the number of origin and destination nodes in a network pair
net_pair_ge_ge <- pull_member(multi_net_usa_ge,"ge_ge")
nnodes(net_pair_ge_ge)
nnodes(net_pair_ge_ge)["orig"]
nnodes(net_pair_ge_ge)["dest"]
prod(nnodes(net_pair_ge_ge) == npairs(net_pair_ge_ge))

}
\keyword{internal}
