pharg


License

License

GroupId

GroupId

com.github.fdietze
ArtifactId

ArtifactId

pharg_2.12
Last Version

Last Version

0.1.1
Release Date

Release Date

Type

Type

jar
Description

Description

pharg
pharg
Project URL

Project URL

https://github.com/fdietze/pharg
Project Organization

Project Organization

com.github.fdietze
Source Code Management

Source Code Management

https://github.com/fdietze/pharg

Download pharg_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.fdietze/pharg_2.12/ -->
<dependency>
    <groupId>com.github.fdietze</groupId>
    <artifactId>pharg_2.12</artifactId>
    <version>0.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.fdietze/pharg_2.12/
implementation 'com.github.fdietze:pharg_2.12:0.1.1'
// https://jarcasting.com/artifacts/com.github.fdietze/pharg_2.12/
implementation ("com.github.fdietze:pharg_2.12:0.1.1")
'com.github.fdietze:pharg_2.12:jar:0.1.1'
<dependency org="com.github.fdietze" name="pharg_2.12" rev="0.1.1">
  <artifact name="pharg_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.fdietze', module='pharg_2.12', version='0.1.1')
)
libraryDependencies += "com.github.fdietze" % "pharg_2.12" % "0.1.1"
[com.github.fdietze/pharg_2.12 "0.1.1"]

Dependencies

compile (2)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.1
org.typelevel : cats_2.12 jar 0.8.1

test (1)

Group / Artifact Type Version
org.specs2 : specs2-core_2.12 jar 3.8.6

Project Modules

There are no modules declared in this project.

pharg

Simple and Flexible Graph Library in Scala

Usage

@ import pharg.DSL._

@ val graph = G(V(1, 2), E(1 -> 2)) 
graph: DirectedGraphData[Int, Nothing, Nothing] = G(V(1, 2), E(1 -> 2))
@ graph.vertices 
res2: Set[Int] = Set(1, 2)
@ graph.edges 
res3: Set[Edge[Int]] = Set(1 -> 2)
@ graph + 5 
res4: DirectedGraphData[Int, Nothing, Nothing] = G(V(1, 2, 5), E(1 -> 2))
@ res4 + Edge(1,5) 
res5: DirectedGraphData[Int, Nothing, Nothing] = G(V(1, 2, 5), E(1 -> 2, 1 -> 5))
@ res5.neighbours(1) 
res6: Set[Int] = Set(2, 5)
@ res5.isConnected 
res7: Boolean = true
@ res5 isIsomorphicTo G(V(4,5,6),E(4 -> 5, 4 -> 6)) 
res8: Boolean = true
@ res5.inducedSubGraph(V(1,2)) 
res9: pharg.DirectedGraphData[Int, Nothing, Nothing] = G(V(1, 2), E(1 -> 2))
@ res5.depthFirstSearch(start = 1, res5.successors).toList 
res10: List[Int] = List(1, 5, 2)

Versions

Version
0.1.1
0.1.0