.. index:: single: graph_types
.. _graph_types/0:

.. rst-class:: right

**category**

``graph_types``
===============

A set of graph related types and generators.

| **Availability:** 
|    ``logtalk_load(graphs(loader))``

| **Author:** Paulo Moura
| **Version:** 2:0:0
| **Date:** 2026-02-19

| **Compilation flags:**
|    ``static``


| **Provides:**
|    :ref:`type::type/1 <type/0::type/1>`
|    :ref:`type::check/2 <type/0::check/2>`
|    :ref:`arbitrary::arbitrary/1 <arbitrary/0::arbitrary/1>`
|    :ref:`arbitrary::arbitrary/2 <arbitrary/0::arbitrary/2>`
| **Uses:**
|    :ref:`integer <integer/0>`
|    :ref:`type <type/0>`

| **Remarks:**

   - Provided types: This category adds ``vertex``, ``edge``, and ``weighted_edge`` types for type-checking when using the ``type`` library object.
   - Type ``vertex``: Any non-variable term.
   - Type ``edge``: An unweighted edge represented as a ``V1-V2`` pair of vertices.
   - Type ``weighted_edge``: A weighted edge represented as ``(V1-V2)-Weight`` where ``V1`` and ``V2`` are vertices and ``Weight`` is a number.
   - Generating edges: Use the ``edges(N,V0,V)`` generator for unweighted edges or ``weighted_edges(N,V0,V,W)`` for weighted edges. ``N`` is the upper limit to the number of edges. ``V0`` and ``V`` must be positive integers and will be used for the range of vertices. ``W`` is the upper limit for edge weights (positive integers).

| **Inherited public predicates:**
|    (none)

.. contents::
   :local:
   :backlinks: top

Public predicates
-----------------

(no local declarations; see entity ancestors if any)

Protected predicates
--------------------

(no local declarations; see entity ancestors if any)

Private predicates
------------------

(no local declarations; see entity ancestors if any)

Operators
---------

(none)

