rebuilding repo
[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
23 (defclass* graph-matrix (basic-graph)
24   ((adjencency-matrix nil r))
25   (:default-initargs
26     :vertex-class 'graph-matrix-vertex
27     :undirected-edge-class 'graph-matrix-edge)
28   (:export-p t)
29   (:documentation "Stub for matrix based graph. Not implemented."))
30
31 ;;; ---------------------------------------------------------------------------
32
33 (defmethod initialize-instance :after ((object graph-matrix) &key)
34   (setf (slot-value object 'adjencency-matrix) 
35         nil))
36
37 ;;; ---------------------------------------------------------------------------
38
39 (defmethod make-vertex-container ((graph graph-matrix) initial-size) 
40   (make-container 'vector-container :initial-size initial-size
41                   :fill-pointer 0))
42
43 ;;; ---------------------------------------------------------------------------
44
45 (defmethod make-edge-container ((graph graph-matrix) initial-size) 
46   (make-container 'vector-container :initial-size initial-size
47                   :fill-pointer 0))
48
49 ;;; ---------------------------------------------------------------------------
50
51 (defclass* graph-matrix-edge (basic-edge)
52   ()
53   #+COPYING :copy-slots
54   (:export-p t)
55   (:documentation "Stub for matrix based graph. Not implemented."))
56
57 ;;; ---------------------------------------------------------------------------
58
59 (defclass* graph-matrix-vertex (basic-vertex)
60   ()
61   (:export-p t)
62   (:documentation "Stub for matrix based graph. Not implemented."))
63
64 ;;; ---------------------------------------------------------------------------
65