outdegree

Synopsis

eset outdegree(eset)
eset outdegree(set, eset)

Description

In its first form, given an edge set S, returns an edge set T which shows how many edges in S go from every entity in the domain of S. In its second form, given a set Q and an edge set S, returns an edge set T which shows how many edges in S go from every entity which is both in the domain of S and also in Q.

Examples

Consider the following edge set, named contain:

>> contain
pizza meat
pizza cheese
pizza pineapple
sandwich meat
sandwich cheese
hamburger meat
Applying outdegree to this set, we will obtain:
>> outdegree (contain)
hamburger 1
pizza 3
sandwich 2
This tells us that hamburger contains one item, pizza contains three, and sandwich contains two. Now, suppose we want to restrict the results we get to a particular set of dishes:
>> served_today= {"pizza", "sandwich", "salsa"}
>> outdegree (served_today, contain)
pizza 3
sandwich 2
We only see information about the dishes that are in the domain of contain and also in the set served_today. Notice that hamburger was not in served_today and is not in the results.

See also

indegree