Search all the values in pe.greaters.

Elements without values are ignored.

Basically, values defined in all greater elements of pe are inherited.

var pos = new POSet[String]
pos.add_chain(["E", "D", "C", "B", "A"])
pos.add_chain(["D", "X", "B"])

var map = new HashMap[String, String]
map["A"] = "a"
map["C"] = "c"
map["X"] = "x"
map["E"] = "e"

assert map.lookup_all_values(pos["B"]).has_exactly(["a"])
assert map.lookup_all_values(pos["C"]).has_exactly(["a", "c"])
assert map.lookup_all_values(pos["D"]).has_exactly(["a", "c", "x"])

Property definitions

poset :: poset $ MapRead :: lookup_all_values
	# Search all the values in `pe.greaters`.
	#
	# Elements without values are ignored.
	#
	# Basically, values defined in all greater elements of `pe` are inherited.
	#
	# ~~~
	# var pos = new POSet[String]
	# pos.add_chain(["E", "D", "C", "B", "A"])
	# pos.add_chain(["D", "X", "B"])
	#
	# var map = new HashMap[String, String]
	# map["A"] = "a"
	# map["C"] = "c"
	# map["X"] = "x"
	# map["E"] = "e"
	#
	# assert map.lookup_all_values(pos["B"]).has_exactly(["a"])
	# assert map.lookup_all_values(pos["C"]).has_exactly(["a", "c"])
	# assert map.lookup_all_values(pos["D"]).has_exactly(["a", "c", "x"])
	# ~~~
	fun lookup_all_values(pe: POSetElement[K]): Set[V]
	do
		var res = new Set[V]
		for k in filter_keys(pe.greaters) do res.add self[k]
		return res
	end
lib/poset/poset.nit:757,2--783,4