Advertisement
Guest User

Untitled

a guest
Sep 1st, 2011
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (defrecord VertexInducedSubgraph [graph pred]
  2.   VSeq
  3.   (vseq-internal [this tm]
  4.     (filter pred
  5.             (vseq-internal graph tm)))
  6.   ESeq
  7.   (eseq-internal [this tm]
  8.     ;; The vertex induced subgraph contains all edges between vertices that are
  9.     ;; both in the subgraph.
  10.     (filter #(and (member? (alpha %) (vseq-internal this identity))
  11.                   (member? (omega %) (vseq-internal this identity)))
  12.             (eseq-internal graph tm)))
  13.   ISeq
  14.   (iseq-internal [this tm dm]
  15.     ;; Same as for ESeq...
  16.     (filter #(and (member? (alpha %) (vseq-internal this identity))
  17.                   (member? (omega %) (vseq-internal this identity)))
  18.             (iseq-internal graph tm dm)))
  19.   Resolving
  20.   (attributed-element-class
  21.     ([this]            (attributed-element-class graph))
  22.     ([this qname]      (attributed-element-class graph qname)))
  23.   (m1class
  24.     ([elem]            (m1class graph))
  25.     ([elem qname]      (m1class graph elem)))
  26.   (domain [elem qname] (domain graph qname))
  27.   (schema [ae]         (schema graph)))
  28.  
  29. ;; This is the error
  30. Unsupported binding form: (attributed-element-class graph)
  31.   [Thrown class java.lang.Exception]
  32.  
  33. Restarts:
  34.  0: [QUIT] Quit to the SLIME top level
  35.  
  36. Backtrace:
  37.   0: clojure.core$destructure$pb__4144.invoke(core.clj:3948)
  38.   1: clojure.core$destructure$process_entry__4159.invoke(core.clj:3949)
  39.   2: clojure.core$reduce1.invoke(core.clj:879)
  40.   3: clojure.core$destructure.invoke(core.clj:3952)
  41.   4: clojure.core$let.doInvoke(core.clj:3965)
  42.   5: clojure.lang.RestFn.invoke(RestFn.java:467)
  43.   6: clojure.lang.Var.invoke(Var.java:413)
  44.   7: clojure.lang.AFn.applyToHelper(AFn.java:172)
  45.   8: clojure.lang.Var.applyTo(Var.java:518)
  46.   9: clojure.lang.Compiler.macroexpand1(Compiler.java:6279)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement