Since the Parent-AID reduces to the SID in the special case of DAG inputs
and is efficiently implemented using reachability algorithms,
it offers a faster way to calculate the SID;
see also Henckel, Würtzen, Weichwald (2024) tools:::Rd_expr_doi("doi:10.48550/arXiv.2402.08616").
The example below can be compared to
library("SID")
system.time(structIntervDist(random_dag(20), random_dag(20)))
For details see Henckel, Würtzen, Weichwald (2024) tools:::Rd_expr_doi("doi:10.48550/arXiv.2402.08616")
The source code is available at github.com/CausalDisco/gadjid
Graph inputs are accepted as adjacency matrices of type double.
An adjacency matrix for a DAG may only contain 0s and 1s.
DAG inputs are validated for acyclicity.
If edge_direction="from row to column", then
a 1 in row r and column c codes a directed edge ‘r → c’;
if edge_direction="from column to row", then
a 1 in row r and column c codes a directed edge ‘c → r’.