% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/foreign.R
\name{graph_from_graphdb}
\alias{graph_from_graphdb}
\title{Load a graph from the graph database for testing graph isomorphism.}
\usage{
graph_from_graphdb(
  url = NULL,
  prefix = "iso",
  type = "r001",
  nodes = NULL,
  pair = "A",
  which = 0,
  base = "https://github.com/igraph/graphsdb/raw/refs/heads/main",
  compressed = TRUE,
  directed = TRUE
)
}
\arguments{
\item{url}{If not \code{NULL} it is a complete URL with the file to import.}

\item{prefix}{Gives the prefix. See details below. Possible values:
\code{iso}, \code{i2}, \code{si4}, \code{si6}, \code{mcs10}, \code{mcs30},
\code{mcs50}, \code{mcs70}, \code{mcs90}.}

\item{type}{Gives the graph type identifier. See details below. Possible
values: \code{r001}, \code{r005}, \code{r01}, \code{r02}, \code{m2D},
\code{m2Dr2}, \code{m2Dr4}, \code{m2Dr6} \code{m3D}, \code{m3Dr2},
\code{m3Dr4}, \code{m3Dr6}, \code{m4D}, \code{m4Dr2}, \code{m4Dr4},
\code{m4Dr6}, \code{b03}, \code{b03m}, \code{b06}, \code{b06m}, \code{b09},
\code{b09m}.}

\item{nodes}{The number of vertices in the graph.}

\item{pair}{Specifies which graph of the pair to read. Possible values:
\code{A} and \code{B}.}

\item{which}{Gives the number of the graph to read. For every graph type
there are a number of actual graphs in the database. This argument specifies
which one to read.}

\item{base}{The base address of the database. See details below.}

\item{compressed}{Logical constant, if TRUE than the file is expected to be
compressed by gzip. If \code{url} is \code{NULL} then a \sQuote{\code{.gz}}
suffix is added to the filename.}

\item{directed}{Logical constant, whether to create a directed graph.}
}
\value{
A new graph object.
}
\description{
This function downloads a graph from a database created for the evaluation
of graph isomorphism testing algorithms.
}
\details{
\code{graph_from_graphdb()} reads a graph from the graph database from an FTP or
HTTP server or from a local copy. It has two modes of operation:

If the \code{url} argument is specified then it should the complete path to
a local or remote graph database file. In this case we simply call
\code{\link[=read_graph]{read_graph()}} with the proper arguments to read the file.

If \code{url} is \code{NULL}, and this is the default, then the filename is
assembled from the \code{base}, \code{prefix}, \code{type}, \code{nodes},
\code{pair} and \code{which} arguments.

Unfortunately the original graph database homepage is now defunct, but see
its old version at
\url{https://web.archive.org/web/20090215182331/http://amalfi.dis.unina.it/graph/db/doc/graphdbat.html}
for the actual format of a graph database file and other information.
}
\section{Related documentation in the C library}{
\href{https://igraph.org/c/html/0.10.17/igraph-Foreign.html#igraph_read_graph_graphdb}{\code{read_graph_graphdb()}}
}

\references{
M. De Santo, P. Foggia, C. Sansone, M. Vento: A large database
of graphs and its use for benchmarking graph isomorphism algorithms,
\emph{Pattern Recognition Letters}, Volume 24, Issue 8 (May 2003)
}
\seealso{
\code{\link[=read_graph]{read_graph()}}, \code{\link[=isomorphic]{isomorphic()}}

Foreign format readers
\code{\link{read_graph}()},
\code{\link{write_graph}()}
}
\author{
Gabor Csardi \email{csardi.gabor@gmail.com}
}
\concept{foreign}
\keyword{graphs}
