Add a node (an element) to the posed

The new element is added unconnected to any other nodes (it is both a new root and a new leaf). Return the POSetElement associated to e. If e is already present in the POSet then just return the POSetElement (usually you will prefer []) is this case.

Property definitions

poset $ POSet :: add_node
	# Add a node (an element) to the posed
	# The new element is added unconnected to any other nodes (it is both a new root and a new leaf).
	# Return the POSetElement associated to `e`.
	# If `e` is already present in the POSet then just return the POSetElement (usually you will prefer []) is this case.
	fun add_node(e: E): POSetElement[E]
	do
		if elements.keys.has(e) then return self.elements[e]
		var poe = new POSetElement[E](self, e, elements.length)
		poe.tos.add(e)
		poe.froms.add(e)
		self.elements[e] = poe
		return poe
	end
lib/poset/poset.nit:91,2--103,4