Skip to content

Commit

Permalink
Updated to Clojure 1.4.0. Bumped version to 0.2.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaeckroth committed Mar 28, 2013
1 parent ec01102 commit d5817b5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
4 changes: 0 additions & 4 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

Vijual is a graph layout engine conceptually similar to graphviz. However, it uses different layout algorithms, creating graphs with a different aesthetic. Vijual uses specialized algorithms for optimal rendering of trees, binary trees, directed, and undirected graphs. Also, it has robust abilities for generating attractive ASCII graphs (as well as traditional bitmap graphs) making it well suited for debugging and exploratory programming directly from the Clojure REPL. Vijual is still an alpha-grade project at this time- Expect many improvements and changes to this library in the near future.

## Usage

Vijual is easy to install through the use of leiningen and clojars. To learn how to use leiningen refer to the documentation available at the leiningen home page. Then, simply include [vijual "0.1.0-SNAPSHOT"] as a dependency in your project.clj to include this library in your programs. You can also access the source of Vijual on github.

## License

GPLv3
8 changes: 2 additions & 6 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
(defproject vijual "0.2.0-SNAPSHOT"
(defproject cc.artifice/vijual "0.2.3"
:description "A Graph Layout Library For Clojure"
:dependencies [[org.clojure/clojure "1.2.0"]
[org.clojure/clojure-contrib "1.2.0"]]
:dev-dependencies [[lein-clojars "0.5.0-SNAPSHOT"]
[swank-clojure "1.2.1"]]
:repositories {"clojars" "http://clojars.org/repo"})
:dependencies [[org.clojure/clojure "1.4.0"]])
9 changes: 7 additions & 2 deletions src/vijual.clj
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
(ns vijual
(:use clojure.contrib.math)
(:use [clojure.contrib.seq-utils :only (positions)])
(:import (java.io File)
(javax.imageio ImageIO)
(java.awt Color)
Expand All @@ -10,6 +8,13 @@

;; Common functions to all layout algorithms

;; from clojure.contrib.seq
(defn positions
"Returns a lazy sequence containing the positions at which pred
is true for items in coll."
[pred coll]
(for [[idx elt] (indexed coll) :when (pred elt)] idx))

(defn half [x]
(/ x 2))

Expand Down

0 comments on commit d5817b5

Please sign in to comment.