All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.aiddl.common.scala.math.graph.Graph.scala Maven / Gradle / Ivy

Go to download

Provides common types and algorithm implementations for the fast prototyping integrative AI systems with the AIDDL framework.

The newest version!
package org.aiddl.common.scala.math.graph

import scala.collection.mutable.HashMap
import scala.collection.mutable

import org.aiddl.core.scala.function.Function
import org.aiddl.core.scala.function.Configurable
import org.aiddl.core.scala.representation._

import org.aiddl.common.scala.Common.NIL

trait Graph {
    def nodeCount: Int
    def edgeCount: Int
    def nodes: CollectionTerm
    def edges: CollectionTerm
    def inNeighbors(v: Term): CollectionTerm
    def outNeighbors(v: Term): CollectionTerm
    def incidentEdges( v: Term ): CollectionTerm
    def transpose: Graph

    def weight( u: Term, v: Term ): Option[Num] = None
    def label( u: Term, v: Term ): Option[Term] = None
    def attributes( u: Term ): Option[Term] = None
    def edgeAttributes( u: Term, v: Term ): Option[Term] = None
}






© 2015 - 2025 Weber Informatics LLC | Privacy Policy