Skip to content

Commit

Permalink
Add edge from args
Browse files Browse the repository at this point in the history
  • Loading branch information
rodigu committed Jan 30, 2022
1 parent 8587e08 commit 40cc17d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,14 @@ export class Network {
edge_list.forEach((edge) => this.addEdge({ from: edge[0], to: edge[1] }));
}

/**
* Add multiple edges from a list of [base_id, base_id].
* @param {EdgeArgs[]} edge_list
*/
addEdgeListArgs(edge_args: EdgeArgs[]) {
edge_args.forEach((edge) => this.addEdge(edge));
}

/**
* Removes an edge between the two given vertices.
*
Expand Down

0 comments on commit 40cc17d

Please sign in to comment.