Graph4scala userguide scalax collection Graph User Guide Peter Empen Introduction Why Use Graph Terminology Status of Work Limitations Initializing Graphs Prerequisites Type Parameters Edge Factories Instantiating Graphs Type Parameter Inference Choosing
scalax collection Graph User Guide Peter Empen Introduction Why Use Graph Terminology Status of Work Limitations Initializing Graphs Prerequisites Type Parameters Edge Factories Instantiating Graphs Type Parameter Inference Choosing an Implementation Inner and Outer Objects Graph Operations Iterating Looking up Nodes and Edges Equality of Inner and Outer Objects Adding and Subtracting Computing Union Di ?erence and Intersection Inspecting Endpoints Inspecting Neighbors and Incident Edges Querying by Function Finding Paths Traversing Measuring Graphs and Grouping Nodes by Degree Classifying Graphs Chaining Method Calls Customizing Graphs De ?ning Custom Edges De ?ning User Constraints Narrowing Type Parameters Modifying Methods Adding new Methods Providing new Implementations Run-time Characteristics Cscalax collection Graph User Guide P Empen Introduction This document provides an example-driven comprehensive coverage of the functionality of Graph as part of the Extended Scala Library In each chapter examples are listed ?rst You may then read the explanations following the examples to make them more coherent or skip them and go directly to the next chapter References to speci ?c Graph classes in this document may be looked up in the Scaladoc API reference This guide is not meant to be complete For the sake of simplicity most examples are based on graphs spanned over nodes of the type Int Graph customization is shown by the node type Airport and the edge type Flight Why Use Graph The most important reasons why Graph speeds up your development are a Simplicity Creating manipulating and querying Graph is intuitive b Consistency Graph seamlessly maintains a consistent state of nodes and edges including prevention of duplicates intelligent addition and removal c Conformity As a regular collection class Graph has the same ??look and feel ? as other members of the Scala collection framework Whenever appropriate result types are Scala collection types themselves d Flexibility All kinds of graphs including mixed graphs multi-graphs and hypergraphs are supported e Functional Style Graph facilitates a concise functional style of utilizing graph functionality including traversals not seen in Java-based libraries f Extendibility You can easily customize Graph to re ect the needs of you application retaining all bene ?ts of Graph g Documentation Ideal progress curve through adequate documentation Look and see Terminology Throughout the library we use the terms node as a synonym to vertex and edge as a generic term for hyperedge line undirected edge or arc directed edge Status of Work Graph creation editing as well as functional traversal and path operations have been completed More functionality is due to be added You are invited to request enhancements based on your problem domain Limitations ? There is no direct support for half-edges but they can be simulated by Option ? Neither node nor edge sets may be in ?nite although this could be achieved by a custom implementation Cscalax collection Graph User Guide P Empen Initializing Graphs Prerequisites The downloadable binaries are named Graph-- jar following the community-convention For each here core there is a separate User Guide To run the examples in the current documentation
Documents similaires
-
38
-
0
-
0
Licence et utilisation
Gratuit pour un usage personnel Attribution requise- Détails
- Publié le Mai 10, 2022
- Catégorie Administration
- Langue French
- Taille du fichier 113kB