Research Article
Blockchain-Based Automated System for Identification and Storage of Networks
Algorithm 3
Virtual topology construction.
| | Input: Tcollection of traces | | | D distance matrix between the nodes | | | Output: TO virtual topology | | (1) | function create TO | | (2) | for each trace do | | (3) | source get_source (trace) | | (4) | D get_D (trace) | | (5) | if get_answer D (trace) then | | (6) | R get_router (trace) | | (7) | (TO, R) add_router | | (8) | (Path, R) add_path | | (9) | else | | (10) | D distance{source}{D} | | (11) | R get_router (D, source, traces) | | (12) | RD get_router (D, source, traces) | | (13) | N nonresponding router (traces, source, D) | | (14) | add router (TO , R U N U ) | | (15) | add path (path, R U N U reversed (N)) | | (16) | return (TO, Paths) |
|