Code Monkey home page Code Monkey logo

dgraph's Issues

Weird type issue

res53: dgraph.DGraph[dgraph.NodeMatchAND[String],dgraph.EdgeMatch[String]] = DGraph(Map(0 -> Node(NodeMatchAND(<function1>),0), 1 -> Node(NodeMatchAND(<function1>),1), 2 -> Node(NodeMatchAND(<function1>),2)),Map((0,1) -> DEdge(EdgeMatch(<function1>),0,1), (0,2) -> DEdge(EdgeMatch(<function1>),0,2)),Map(2 -> Vector(0), 1 -> Vector(0), 0 -> Vector()),Map(2 -> Vector(), 1 -> Vector(), 0 -> Vector(1, 2)))

res54: dgraph.DGraph[String,String] = DGraph(Map(0 -> Node(a,0), 1 -> Node(b,1), 2 -> Node(c,2)),Map((0,1) -> DEdge(1,0,1), (0,2) -> DEdge(2,0,2)),Map(2 -> Vector(0), 1 -> Vector(0), 0 -> Vector()),Map(2 -> Vector(), 1 -> Vector(), 0 -> Vector(1, 2)))

scala> res54.filter(res43)
<console>:32: error: type mismatch;
 found   : dgraph.DGraph[dgraph.NodeMatchAND[String],dgraph.EdgeMatch[String]]
 required: dgraph.DGraph[dgraph.NodeMatchLike[String],dgraph.EdgeMatchLike[String]]
Note: dgraph.NodeMatchAND[String] <: dgraph.NodeMatchLike[String], but class DGraph is invariant in type N.
You may wish to define N as +N instead. (SLS 4.5)
Note: dgraph.EdgeMatch[String] <: dgraph.EdgeMatchLike[String], but class DGraph is invariant in type E.
You may wish to define E as +E instead. (SLS 4.5)

Trying to map a graph into a pattern is causing some problems because NodeMatchAND[N] can't be automatically cast to NodeMatchLike[N] and similarly with edges.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.