WUnDiEdge

scalax.collection.edges.labeled.WUnDiEdge
final case class WUnDiEdge[+N](source: N, target: N, weight: Double) extends AbstractGenericUnDiEdge[N, WUnDiEdge], WUnDiEdgeToString

Generic weighted undirected edge.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait AnyUnDiEdge[N]
trait AnyEdge[N]
trait AnyHyperEdge[N]
trait Edge[N]
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def map[NN](node_1: NN, node_2: NN): WUnDiEdge[NN]

Inherited methods

final override def arity: Int

Number of the endpoints of this edge. At least two nodes are joined. In case of a hook, the two nodes are identical. Hyperedges may link more than two nodes.

Number of the endpoints of this edge. At least two nodes are joined. In case of a hook, the two nodes are identical. Hyperedges may link more than two nodes.

Attributes

Definition Classes
Inherited from:
AnyEdge
override protected def baseEquals(other: Edge[_]): Boolean

Attributes

Definition Classes
EqUnDi -> Eq
Inherited from:
EqUnDi (hidden)
override protected def baseHashCode: Int

Attributes

Definition Classes
EqUnDi -> Eq
Inherited from:
EqUnDi (hidden)
override def canEqual(that: Any): Boolean

Attributes

Definition Classes
Inherited from:
Edge
final def contains[M >: N](node: M): Boolean

Same as isAt.

Same as isAt.

Attributes

Inherited from:
Edge
def ends: Several[N]

The endpoints of this edge, in other words the nodes this edge connects.

The endpoints of this edge, in other words the nodes this edge connects.

Attributes

Inherited from:
AnyEdge
override def equals(other: Any): Boolean

Compares the receiver object (this) with the argument object (that) for equivalence.

Compares the receiver object (this) with the argument object (that) for equivalence.

Any implementation of this method should be an equivalence relation:

  • It is reflexive: for any instance x of type Any, x.equals(x) should return true.
  • It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any instances x, y, and z of type Any if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is usually necessary to override hashCode to ensure that objects which are "equal" (o1.equals(o2) returns true) hash to the same scala.Int. (o1.hashCode.equals(o2.hashCode)).

Value parameters

that

the object to compare against this object for equality.

Attributes

Returns

true if the receiver object is equivalent to the argument; false otherwise.

Definition Classes
Eq -> Any
Inherited from:
Eq (hidden)
final override def hasSource(pred: N => Boolean): Boolean

true if any source end of this edge fulfills pred.

true if any source end of this edge fulfills pred.

Attributes

Definition Classes
Inherited from:
AnyUnDiEdge
final override def hasSource[M >: N](node: M): Boolean

true if node is a source of this edge. In case this edge is undirected this method maps to isAt.

true if node is a source of this edge. In case this edge is undirected this method maps to isAt.

Attributes

Definition Classes
Inherited from:
AnyUnDiEdge
final override def hasTarget(pred: N => Boolean): Boolean

true if any target end of this edge fulfills pred.

true if any target end of this edge fulfills pred.

Attributes

Definition Classes
Inherited from:
AnyUnDiEdge
final override def hasTarget[M >: N](node: M): Boolean

true if node is a target of this edge. In case this edge is undirected this method maps to isAt.

true if node is a target of this edge. In case this edge is undirected this method maps to isAt.

Attributes

Definition Classes
Inherited from:
AnyUnDiEdge
override def hashCode: Int

Calculate a hash code value for the object.

Calculate a hash code value for the object.

The default hashing algorithm is platform dependent.

Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

Attributes

Returns

the hash code value for this object.

Definition Classes
Eq -> Any
Inherited from:
Eq (hidden)
final override def isAt(pred: N => Boolean): Boolean

true if any end of this edge fulfills pred.

true if any end of this edge fulfills pred.

Attributes

Definition Classes
Inherited from:
AnyEdge
final override def isAt[M >: N](node: M): Boolean

true if node is incident with this edge.

true if node is incident with this edge.

Attributes

Definition Classes
Inherited from:
AnyEdge
override def isDirected: Boolean

Whether this edge is directed.

Whether this edge is directed.

Attributes

Definition Classes
Inherited from:
AnyUnDiEdge
final override def isHyperEdge: Boolean

Whether this edge's type is hyperedge meaning that it may have more than two ends.

Whether this edge's type is hyperedge meaning that it may have more than two ends.

Attributes

Definition Classes
Inherited from:
AnyEdge

Attributes

Inherited from:
Edge
final override def isLooping: Boolean

Whether this edge produces a self-loop. In case of a non-hyperedge, a loop is given if the incident nodes are equal. In case of a directed hyperedge, a loop is given if any of the targets is included in the sources. In case of an undirected hyperedge, a loop is given if any of the ends is a duplicate.

Whether this edge produces a self-loop. In case of a non-hyperedge, a loop is given if the incident nodes are equal. In case of a directed hyperedge, a loop is given if any of the targets is included in the sources. In case of an undirected hyperedge, a loop is given if any of the ends is a duplicate.

Attributes

Definition Classes
Inherited from:
AnyUnDiEdge
final def isUndirected: Boolean

Whether this edge is undirected.

Whether this edge is undirected.

Attributes

Inherited from:
Edge
override protected def labelSeparator: String

The part to be printed after the edge ends and before the label.

The part to be printed after the edge ends and before the label.

Attributes

Definition Classes
WEdgeToString -> LEdgeToString
Inherited from:
WEdgeToString (hidden)
protected def labelToString: String

The part to be printed after the edge ends and the label separator.

The part to be printed after the edge ends and the label separator.

Attributes

Inherited from:
WEdgeToString (hidden)
override def matches(p1: N => Boolean, p2: N => Boolean): Boolean

true if
a) two distinct ends of this undirected edge exist for which p1 and p2 hold or
b) p1 holds for a source and p2 for a target of this directed edge.

true if
a) two distinct ends of this undirected edge exist for which p1 and p2 hold or
b) p1 holds for a source and p2 for a target of this directed edge.

Attributes

Definition Classes
Inherited from:
AnyUnDiEdge
override def matches[M >: N](n1: M, n2: M): Boolean

true if a. being an undirected edge, both n1 and n2 are at this edge a. being a directed edge, n1 is a source and n2 a target of this edge.

true if a. being an undirected edge, both n1 and n2 are at this edge a. being a directed edge, n1 is a source and n2 a target of this edge.

Attributes

Definition Classes
Inherited from:
AnyUnDiEdge
final override def node(n: Int): N

The n'th node of this edge.

The n'th node of this edge.

Attributes

Throws
IllegalArgumentException

if n does not meet 0 <= n < arity.

Definition Classes
Inherited from:
AnyEdge
final override def node1: N

The first node of this edge.

The first node of this edge.

Attributes

Definition Classes
Inherited from:
AnyUnDiEdge
final override def node2: N

The second node of this edge.

The second node of this edge.

Attributes

Definition Classes
Inherited from:
AnyUnDiEdge
protected def nodesToString: String

Attributes

Inherited from:
EdgeToString (hidden)
override protected def nodesToStringSeparator: String

Attributes

Definition Classes
UnDiEdgeToString -> EdgeToString
Inherited from:
UnDiEdgeToString
final def nonHyperEdge: Boolean

Whether this edge has exactly two ends.

Whether this edge has exactly two ends.

Attributes

Inherited from:
Edge
final def nonLooping: Boolean

Same as ! looping.

Same as ! looping.

Attributes

Inherited from:
Edge

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product
final override def sources: OneOrMore[N]

All source ends of this edge.

All source ends of this edge.

Attributes

Definition Classes
Inherited from:
AnyUnDiEdge
final override def targets: OneOrMore[N]

All target ends of this edge.

All target ends of this edge.

Attributes

Definition Classes
Inherited from:
AnyUnDiEdge
override def toString: String

Implemented in terms of the protected methods nodesToString, labelSeparator and labelToString.

Implemented in terms of the protected methods nodesToString, labelSeparator and labelToString.

Attributes

Definition Classes
LEdgeToString -> EdgeToString -> Any
Inherited from:
LEdgeToString (hidden)
final protected def unDiBaseEquals(n1: Any, n2: Any): Boolean

Attributes

Inherited from:
EqUnDi (hidden)
final override def withSources[U](f: N => U): Unit

Applies f to all source ends of this edge without any memory allocation.

Applies f to all source ends of this edge without any memory allocation.

Attributes

Definition Classes
Inherited from:
AnyUnDiEdge
final override def withTargets[U](f: N => U): Unit

Applies f to the target ends of this edge without any memory allocation.

Applies f to the target ends of this edge without any memory allocation.

Attributes

Definition Classes
Inherited from:
AnyUnDiEdge