This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.opencypher.caps.impl.spark.physical | |
case class Pipeline[I <: Node[I], O <: Node[O]]( | |
sequence: TreeTransformation[I, O]) { | |
def chain[A](t: TreeTransformation[O, A]): Pipeline[I, A] = { | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait PropertyGraph[R <: Records] { | |
def bind(p: Pattern): R | |
} | |
case class Pattern( | |
topology: Set[Connection] = Set.empty, | |
nodeConstraints: Map[Node, Set[NodeConstraint]] = Map.empty, | |
relConstraints: Map[Rel, Set[RelConstraint]] = Map.empty, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"paragraphs": [{ | |
"text": "%md \n### This notebook shows how to get started with CAPS inside of Zeppelin.\n\nIn order to use this notebook, follow these steps:\n\n - Go to the Interpreter (`anonymous/username` -> `Interpreter`) settings in the top right\n - Find the `spark` interpreter and click on `edit` \n - In the `Dependencies` section, add the path to the CAPS jar file\n - Click on `save`", | |
"user": "anonymous", | |
"dateUpdated": "2017-10-17T15:02:02+0100", | |
"config": { | |
"colWidth": 12, | |
"enabled": true, | |
"results": {}, | |
"editorSetting": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.Function1; | |
import scala.collection.Iterator; | |
import com.signalcollect.triplerush.japi.TripleRush; | |
public class TripleRushTest { | |
public static void main(String[] args) { | |
TripleRush tr = new TripleRush(); | |
tr.addTriple("http://a", "http://b", "http://c"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.signalcollect._ | |
import com.signalcollect.interfaces.MessageBus | |
import scala.util.Random | |
case class RandomWalker(idList: List[Any] = List(), maxLength: Int = 5) { | |
def extend(id: Any): Option[RandomWalker] = { | |
if (idList.size < maxLength) { | |
Some(RandomWalker(id :: idList, maxLength)) | |
} else { | |
println("This walk has ended, idList = " + idList) |