From: Gary King Date: Sun, 7 Jan 2007 20:08:55 +0000 (-0500) Subject: Bumped version and copyright; cleanup formatting in system defs; standardized test-op X-Git-Url: http://repo.macrolet.net/gitweb/?p=cl-graph.git;a=commitdiff_plain;h=25d9c9819ce0bb610c024c3ef760660e76653c21 Bumped version and copyright; cleanup formatting in system defs; standardized test-op darcs-hash:20070107200855-3cc5d-d8b96183f35b6a1f2784e8a26651bd89ae317f25.gz --- diff --git a/COPYING b/COPYING index 441ea68..084b26d 100644 --- a/COPYING +++ b/COPYING @@ -1,4 +1,4 @@ -Copyright (c) 2004-2006 Gary Warren King (gwking@metabang.com) +Copyright (c) 2004-2007 Gary Warren King (gwking@metabang.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), diff --git a/cl-graph-test.asd b/cl-graph-test.asd index 70ca537..e822084 100644 --- a/cl-graph-test.asd +++ b/cl-graph-test.asd @@ -1,8 +1,4 @@ -;;; -*- Mode: Lisp; package: CL-USER; Syntax: Common-lisp; Base: 10 -*- - -#| - -|# +;;; -*- Mode: Lisp; package: cl-user; Syntax: Common-lisp; Base: 10 -*- (in-package :common-lisp-user) (defpackage #:asdf-cl-graph-test (:use #:cl #:asdf)) @@ -15,34 +11,19 @@ :licence "MIT Style License" :description "Tests for CL-Graph" - :components ((:module "unit-tests" - :components ((:file "package") - (:file "test-graph" :depends-on ("package")) - (:file "test-graph-container" :depends-on ("test-graph")) - (:file "test-connected-components" :depends-on ("test-graph")) - (:file "test-graph-metrics" :depends-on ("test-graph")) - (:file "test-graph-algorithms" :depends-on ("test-graph")) - )) + :components ((:module + "unit-tests" + :components + ((:file "package") + (:file "test-graph" :depends-on ("package")) + (:file "test-graph-container" :depends-on ("test-graph")) + (:file "test-connected-components" :depends-on ("test-graph")) + (:file "test-graph-metrics" :depends-on ("test-graph")) + (:file "test-graph-algorithms" :depends-on ("test-graph")) + )) - (:module "dev" - :components ((:static-file "notes.text")))) - - :in-order-to ((test-op (load-op cl-graph-test))) + (:module + "dev" + :components + ((:static-file "notes.text")))) :depends-on (cl-graph lift)) - -;;; --------------------------------------------------------------------------- - -(defmethod perform :after ((op test-op ) (c (eql (find-system 'cl-graph-test)))) - (describe - (funcall - (intern (symbol-name '#:run-tests) '#:lift) - :suite (intern (symbol-name '#:cl-graph-test) '#:cl-graph-test)))) - -;;; --------------------------------------------------------------------------- - -(defmethod perform :after ((o load-op) (c (eql (find-system 'cl-graph-test)))) - ) - -(defmethod operation-done-p ((o test-op) (c (eql (find-system 'cl-graph-test)))) - ;; testing is never done... - (values nil)) diff --git a/cl-graph.asd b/cl-graph.asd index d0e14b5..6ef0b94 100644 --- a/cl-graph.asd +++ b/cl-graph.asd @@ -1,10 +1,6 @@ -;;; -*- Mode: Lisp; package: CL-USER; Syntax: Common-lisp; Base: 10 -*- +;;; -*- Mode: Lisp; package: cl-user; Syntax: Common-lisp; Base: 10 -*- -#| - -|# - -(in-package :common-lisp-user) +(in-package #:common-lisp-user) (defpackage #:asdf-cl-graph (:use #:cl #:asdf)) (in-package #:asdf-cl-graph) @@ -21,61 +17,79 @@ instructions.")) (asdf:operate 'asdf:load-op 'asdf-system-connections) (defsystem cl-graph - :version "0.8" + :version "0.8.1" :author "Gary Warren King " :maintainer "Gary Warren King " :licence "MIT Style License" :description "Graph manipulation utilities for Common Lisp" - :components ((:module "dev" - :components ((:file "package") - (:file "api" - :depends-on ("package")) - (:file "macros" - :depends-on ("package")) - (:file "graph" - :depends-on ("api" "macros")) - (:file "graph-container" - :depends-on ("graph")) - (:file "graph-matrix" - :depends-on ("graph")) - (:file "graph-metrics" - :depends-on ("graph")) - (:file "graph-algorithms" - :depends-on ("graph")) + :components ((:module + "dev" + :components + ((:file "package") + (:file "api" + :depends-on ("package")) + (:file "macros" + :depends-on ("package")) + (:file "graph" + :depends-on ("api" "macros")) + (:file "graph-container" + :depends-on ("graph")) + (:file "graph-matrix" + :depends-on ("graph")) + (:file "graph-metrics" + :depends-on ("graph")) + (:file "graph-algorithms" + :depends-on ("graph")) - (:static-file "notes.text") + (:static-file "notes.text") - (:module "graphviz" :depends-on ("graph") - :components ((:file "graphviz-support"))))) - (:module "website" - :components ((:module "source" - :components ((:static-file "index.lml")))))) - + (:module "graphviz" :depends-on ("graph") + :components ((:file "graphviz-support"))))) + (:module + "website" + :components + ((:module "source" + :components ((:static-file "index.lml")))))) + :in-order-to ((test-op (load-op cl-graph-test))) + :perform (test-op :after (op c) + (describe + (funcall (intern (symbol-name '#:run-tests) :lift) + :suite '#:cl-graph-test))) :depends-on (metatilities - cl-containers - metabang-bind - cl-mathstats - asdf-system-connections ; makes ASDF-Install get this automatically - )) + cl-containers + metabang-bind + cl-mathstats + ;; makes ASDF-Install get this automatically + asdf-system-connections + )) -;;; --------------------------------------------------------------------------- +(defmethod operation-done-p + ((o test-op) (c (eql (find-system 'cl-graph)))) + (values nil)) +#+asdf-system-connections (asdf:defsystem-connection cl-graph-and-cl-variates :requires (cl-graph cl-variates) - :components ((:module "dev" - :components ((:file "graph-and-variates") - (:file "graph-generation" - :depends-on ("graph-and-variates")))))) + :components ((:module + "dev" + :components + ((:file "graph-and-variates") + (:file "graph-generation" + :depends-on ("graph-and-variates")))))) +#+asdf-system-connections (asdf:defsystem-connection cl-graph-and-cl-graphviz :requires (cl-graph cl-graphviz) - :components ((:module "dev" - :components - ((:module "graphviz" - :components - ((:file "graphviz-support-optional"))))))) + :components ((:module + "dev" + :components + ((:module "graphviz" + :components + ((:file "graphviz-support-optional"))))))) +#+asdf-system-connections (asdf:defsystem-connection cl-graph-and-metacopy :requires (cl-graph metacopy) - :components ((:module "dev" - :components ((:file "copying"))))) + :components ((:module + "dev" + :components ((:file "copying"))))) diff --git a/dev/notes.text b/dev/notes.text index 140ae52..85c5e57 100644 --- a/dev/notes.text +++ b/dev/notes.text @@ -1,4 +1,56 @@ +The only reasons we rely on cl-mathstats are + +; /Users/gwking/.fasls/allegro-8.0m-macosx-x86/Users/gwking/darcs/cl-graph/dev/graphviz/graphviz-support.fasl +Warning: While compiling these undefined functions were referenced: + cl-graph::matrix-trace from position 7424 in + /Users/gwking/darcs/cl-graph/dev/graph-metrics.lisp + cl-graph::matrix-multiply from position 7424 in + /Users/gwking/darcs/cl-graph/dev/graph-metrics.lisp, 7827 in + /Users/gwking/darcs/cl-graph/dev/graph-metrics.lisp + cl-graph::normalize-matrix from position 7424 in + /Users/gwking/darcs/cl-graph/dev/graph-metrics.lisp + +;;; move to l0-arrays? or metatilities? + cl-graph:: sum-of-array-elements from position 7424 in + /Users/gwking/darcs/cl-graph/dev/graph-metrics.lisp, 7827 in + /Users/gwking/darcs/cl-graph/dev/graph-metrics.lisp + cl-graph::combination-count from position 5742 in + /Users/gwking/darcs/cl-graph/dev/graph-metrics.lisp + +some other things might be +e+, degrees->radians and radians->degrees, + combination-count, permutation-count, sum-of-array-elements + + +- Use samep in samep for associative containers + optimize : find-edge-between-vertexes-if +(defmethod find-edge-between-vertexes-if ((graph graph-container) + (vertex-1 graph-container-vertex) + (value-2 t) + fn + &key error-if-not-found?) + (let ((v2 (find-vertex graph value-2 error-if-not-found?))) + (when v2 + (find-edge-between-vertexes-if + graph vertex-1 v2 fn + :error-if-not-found? error-if-not-found?)))) + +;;; --------------------------------------------------------------------------- + +(defmethod find-edge-between-vertexes-if ((graph graph-container) + (value-1 t) + (vertex-2 graph-container-vertex) + fn + &key error-if-not-found?) + (let ((v1 (find-vertex graph value-1 error-if-not-found?))) + (when v1 + (find-edge-between-vertexes-if + graph v1 vertex-2 fn + :error-if-not-found? error-if-not-found?)))) + + +Hmm, should probably write a macro that created all four method [ (t t), (t vertex), (vertex t) and (vertex vertex)] magically... + Should have delete-item-at-1 diff --git a/dev/package.lisp b/dev/package.lisp index f0f28d5..eb250c9 100644 --- a/dev/package.lisp +++ b/dev/package.lisp @@ -11,7 +11,7 @@ DISCUSSION (defpackage #:cl-graph (:use #:common-lisp #:metatilities #:cl-containers - #:metabang.bind #:metabang.math) + #:metabang.bind) (:nicknames #:metabang.graph) (:documentation "CL-Graph is a Common Lisp library for manipulating graphs and running graph algorithms.")