[ library(conjunto) | Reference Manual | Alphabetic Index ]

el_weight(+Var, ?Wvar)

Var is an element of type e(Val,Weight) from a weighted domain. Wvar is a free variable unifying with the weight Weight of Var.
A weighted element.
Term unifying with an integer.


Unifyes the weight of the term Var which should be of the form e(Val,Weight) with Wvar. This predicate is convenient to select elements for the labeling of weighted sets.

Fail Conditions

Fails if Var is not of the form e(Val,Weight) or if Wvar is not unifyable with the weight.




[eclipse 12]: E = e(1,2), el_weight(E, W).

E = e(1, 2)
W = 2

See Also

max_weight / 2, `:: / 2