Skip to content

Commit 688535c

Browse files
committed
Documentation updates for issue #50. Copyright date update.
1 parent 13401a0 commit 688535c

File tree

10 files changed

+177
-71
lines changed

10 files changed

+177
-71
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2014-2015 Christopher D. Russell
3+
Copyright (c) 2014-2016 Christopher D. Russell
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 86 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# Encapsule/jsgraph
1+
![Encapsule.io](https://encapsule.io/images/blue-burst-encapsule.io-logo-251x64.png "Encapsule.io")
22

3-
[![Join the chat at https://gitter.im/Encapsule/jsgraph](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Encapsule/jsgraph?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
3+
# Encapsule/jsgraph
44

5-
## About jsgraph
5+
![Begin at the beginning...](./docs/begin-at-the-beginning.jpg)
66

77
_"... At the other end of the spectrum is, for example, graph theory, where the basic object, a graph, can be immediately comprehended. One will not get anywhere in graph theory by sitting in an armchair and trying to understand graphs better. Neither is it particularly necessary to read much of the literature before tackling a problem: it is of course helpful to be aware of some of the most important techniques, but the interesting problems tend to be open precisely because the established techniques cannot easily be applied."_ - [W.T. Gowers](https://en.wikipedia.org/wiki/Timothy_Gowers)
88

9-
### Status
9+
[![Build Status](https://travis-ci.org/Encapsule/jsgraph.svg?branch=master)](https://travis-ci.org/Encapsule/jsgraph) [![Join the chat at https://gitter.im/Encapsule/jsgraph](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Encapsule/jsgraph?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
1010

11-
[![Build Status](https://travis-ci.org/Encapsule/jsgraph.svg?branch=master)](https://travis-ci.org/Encapsule/jsgraph)
11+
See also: [Mathematical Graph Theory](https://en.wikipedia.org/wiki/Graph_theory)
1212

13-
Ich danke Ihnen sehr [Travis CI](https://travis-ci.org/Encapsule/jsgraph.svg?branch=master)
13+
## About jsgraph
1414

1515
### Summary
1616

@@ -30,7 +30,7 @@ The library provides and normalizes the following operations independent of grap
3030

3131
### Audience
3232

33-
jsgraph is a framework for building next-generation frameworks on Node.js and HTML 5.
33+
jsgraph is a framework for building next-generation frameworks on Node.js and HTML 5 applications:
3434

3535
- Use instead of in-memory object hierarchies linked by reference:
3636
- Serializable to JSON (even when cyclic).
@@ -49,6 +49,72 @@ If you're considering using jsgraph in a commerical product, please get in touch
4949

5050
### Programming
5151

52+
#### API Overview
53+
54+
[DirectedGraph](./docs/object-DirectedGraph.md) container class methods:
55+
56+
- constructor
57+
- getGraphName
58+
- setGraphName
59+
- getGraphDescription
60+
- setGraphDescription
61+
- isVertex
62+
- addVertex
63+
- removeVertex
64+
- getVertexProperty
65+
- setVertexProperty
66+
- hasVertexProperty
67+
- clearVertexProperty
68+
- inDegree
69+
- inEdges
70+
- outDegree
71+
- outEdges
72+
- isEdge
73+
- addEdge
74+
- removeEdge
75+
- getEdgeProperty
76+
- setEdgeProperty
77+
- hasEdgeProperty
78+
- clearEdgeProperty
79+
- verticesCount
80+
- getVertices
81+
- edgesCount
82+
- getEdges
83+
- rootVerticesCount
84+
- getRootVertices
85+
- leafVerticesCount
86+
- getLeafVertices
87+
- toJSON / toObject (alias)
88+
- stringify
89+
- fromObject
90+
- fromJSON
91+
92+
Included algorithms:
93+
94+
- [Tranposition](./docs/algorithm-transpose.md) (flips the direction of edges)
95+
- [Breadth-first visit and search](./docs/algorithm-bft.md) w/visitor pattern callbacks:
96+
- initializeVertex
97+
- startVertex
98+
- discoverVertex
99+
- examineVertex
100+
- examineEdge
101+
- nonTreeEdge
102+
- grayTarget
103+
- blackTarget
104+
- finishVertex
105+
- [Depth-first visit and search](./docs/algorithm-dft.md) w/visitor pattern callbacks:
106+
- initializeVertex
107+
- startVertex
108+
- discoverVertex
109+
- examineEdge
110+
- treeEdge
111+
- backEdge
112+
- forwardOrCrossEdge
113+
- finishVertex
114+
- finishEdge
115+
116+
#### API Detail
117+
52118
- [Object Reference: DirectedGraph container](./docs/object-DirectedGraph.md)
53119
- [Object Reference: DirectedGraph export object](./docs/object-JSON.md)
54120
- [Transform Reference: jsgraph.directed.transpose](./docs/transform-transpose.md)
@@ -61,7 +127,7 @@ If you're considering using jsgraph in a commerical product, please get in touch
61127
In your project, install via npm.
62128

63129
$ npm install jsgraph --save
64-
jsgraph@0.6.xx node_modules/jsgraph
130+
jsgraph@0.7.xx node_modules/jsgraph
65131

66132
### Sources
67133

@@ -86,7 +152,7 @@ See also: [Encapsule/jsgraph on GitHub](https://github.com/Encapsule/jsgraph)
86152

87153
## Example
88154

89-
The following short example constructs a `DirectedGraph` container using a v0.6 jsgraph digraph data object, and derives a simple rank assignment algorithm from jsgraph's bundled `breadthFirstTraverse` algorithm. Note that the BFT visitor interface callback functions leverage the `DirectedGraph` API to get/set the data property value of each visited vertex to its rank.
155+
The following short example constructs a `DirectedGraph` container using a v0.7 jsgraph digraph data object, and derives a simple rank assignment algorithm from jsgraph's bundled `breadthFirstTraverse` algorithm. Note that the BFT visitor interface callback functions leverage the `DirectedGraph` API to get/set the data property value of each visited vertex to its rank.
90156
```javascript
91157
// Encapsule/jsgraph/examples/bft-vertex-ranking.js
92158
var jsgraph = require('jsgraph');
@@ -127,7 +193,7 @@ if (response.error) {
127193
throw new Error(response.error);
128194
}
129195
console.log("DirectedGraph: '" +
130-
digraph.toJSON(undefined,4) + "'");
196+
digraph.stringify(undefined,4) + "'");
131197
console.log("BFT traversal: '" +
132198
JSON.stringify(response.result,undefined,4) + "'");
133199
```
@@ -188,6 +254,15 @@ BFT traversal: '{
188254

189255
## Release
190256

257+
**v0.7 is a breaking API change and documentation release**
258+
259+
- Added new method `DirectedGraph.stringify`
260+
- Changed method semantics of `DirectedGraph.toJSON` to return a serializable object instead of a JSON-encoded string.
261+
- Alias method `DirectedGraph.toObject` to call `DirectedGraph.toJSON`. The `toObject` method is now deprecated and will be removed in a future release.
262+
- Updated documentation:
263+
- Per above breaking changes to the `DirectedGraph` serialization API.
264+
- Added additional information on set/get of `DirectedGraph` name and description properties.
265+
191266
**v0.6 is a bug fix release that's API-compatible with v0.5**
192267

193268
- DFT algorithm bug fixes impacting order and identity of client visitor callbacks.
@@ -349,7 +424,7 @@ A depth-first traversal concludes when all reacable vertices have been visited,
349424

350425
<hr>
351426

352-
Copyright &copy; 2014-2015 [Christopher D. Russell](https://github.com/ChrisRus)
427+
Copyright &copy; 2014-2016 [Christopher D. Russell](https://github.com/ChrisRus)
353428

354429

355430

docs/algorithm-bft.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ finishVertex | { u: string, g: DirectedGraph } | invoked on a vertex after all o
4444

4545
<hr>
4646

47-
Copyright &copy; 2014-2015 [Christopher D. Russell](https://github.com/ChrisRus)
47+
Copyright &copy; 2014-2016 [Christopher D. Russell](https://github.com/ChrisRus)
4848

docs/algorithm-dft.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ finishEdge | { e: { u: string, v: string }, g: DirectedGraph } | invoked on ea
4444

4545
<hr>
4646

47-
Copyright &copy; 2014-2015 [Christopher D. Russell](https://github.com/ChrisRus)
47+
Copyright &copy; 2014-2016 [Christopher D. Russell](https://github.com/ChrisRus)
4848

docs/algorithm-traversal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,5 +120,5 @@ if (!response.error) {
120120

121121
<hr>
122122

123-
Copyright &copy; 2014-2015 [Christopher D. Russell](https://github.com/ChrisRus)
123+
Copyright &copy; 2014-2016 [Christopher D. Russell](https://github.com/ChrisRus)
124124

docs/example-dft.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,5 +122,5 @@ A simple JavaScript/jsgraph implementation of Depth-first search (DFS) example f
122122

123123
<hr>
124124

125-
Copyright &copy; 2014-2015 [Christopher D. Russell](https://github.com/ChrisRus)
125+
Copyright &copy; 2014-2016 [Christopher D. Russell](https://github.com/ChrisRus)
126126

0 commit comments

Comments
 (0)