[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PVS-Help] Sets-reaching their individual elements, Graphs
Kelly: It would help to know more about your representation for graphs.
If the set of edges, say A, is a subset of some finitely enumerable set
like an integer subrange, then you could scan the subrange and pick out
the edges in A. It is also possible that the operations you wish to
perform do not require the set elements to be enumerated, e.g., taking
the maximum or minimum, or computing the image of the set with respect
to a map. However, such operations might not be executable.
Alternately, you could use an adjacency list representation for the
edges out of a vertex.
K McElroy <email@example.com> wrote:
> Is there anyway to go through each individual elements of a set?
> I am using a graph where extra information is going to be tagged onto the e=
> dges of a vertex, in order to get the correct path. So i will travel to eac=
> h vertex and obtain the edges it has to get the other piece of information.=
> However I will not know how many edges a vertex has or which edge I would =
> like to leave the vertex on, therefore I am looking at going through all th=
> e edges the vertex has.
> Any suggests would be much apprecaited.=20
> Because I'm using graphs and much of the code I need is already written I w=
> ould like to stay with sets if at all possible.
> Kelly =20