Constructs an AStar algorithm object.
BFS([Graph? graph, this.source = - 1, this.target = - 1 ]) { this.graph = graph ?? Graph(); }