removed ;;; -+ lines
[cl-graph.git] / dev / graph-matrix.lisp
1 ;;;-*- Mode: Lisp; Package: metabang.graph -*-
2
3 #| simple-header
4
5 $Id: graph-matrix.lisp,v 1.1 2005/05/01 21:40:26 gwking Exp $
6
7 Copyright 1992 - 2005 Experimental Knowledge Systems Lab, 
8 University of Massachusetts Amherst MA, 01003-4610
9 Professor Paul Cohen, Director
10
11 Author: Gary King
12
13 DISCUSSION
14
15 CtF uses an adj list (vector of edges with lists) or adj matrix (vector with vectors)
16
17 I think I'd like a numeric class and then a object one... maybe someday
18 |#
19 (in-package #:metabang.graph)
20
21
22 (defclass* graph-matrix (basic-graph)
23   ((adjencency-matrix nil r))
24   (:default-initargs
25     :vertex-class 'graph-matrix-vertex
26     :undirected-edge-class 'graph-matrix-edge)
27   (:export-p t)
28   (:documentation "Stub for matrix based graph. Not implemented."))
29
30
31 (defmethod initialize-instance :after ((object graph-matrix) &key)
32   (setf (slot-value object 'adjencency-matrix) 
33         nil))
34
35
36 (defmethod make-vertex-container ((graph graph-matrix) initial-size) 
37   (make-container 'vector-container :initial-size initial-size
38                   :fill-pointer 0))
39
40
41 (defmethod make-edge-container ((graph graph-matrix) initial-size) 
42   (make-container 'vector-container :initial-size initial-size
43                   :fill-pointer 0))
44
45
46 (defclass* graph-matrix-edge (basic-edge)
47   ()
48   #+COPYING :copy-slots
49   (:export-p t)
50   (:documentation "Stub for matrix based graph. Not implemented."))
51
52
53 (defclass* graph-matrix-vertex (basic-vertex)
54   ()
55   (:export-p t)
56   (:documentation "Stub for matrix based graph. Not implemented."))
57
58