Added documenting comments

main
CSDUMMI 2022-03-22 09:14:34 +01:00
rodzic 48e8cdf4ae
commit 243c363f3b
2 zmienionych plików z 19 dodań i 0 usunięć

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -11,15 +11,34 @@ class GraphIndex {
this._graph = Graph();
}
/**
* Each project points to a database
* containing all the information about a project.
*/
addProject(cid) {
this._graph.addNode(cid)
}
/**
* A depedency is a directed edg
* from the project dependent on another project to that project.
*
* If project A dependes on B, an edge from A to B is added.
*
* The weight is in the interval 0,1 and indicates the probability
* that an error/bug/problem in the dependency causes an error/bug/problem
* in the dependent project.
*/
addDependency(dependent, dependency, weight) {
this._graph.addEdge(dependent, depedency, weight)
}
/**
* @returns {Array<string>} cids of the projects in the Graph.
*/
get projects() {
return this._graph.nodes()
}
depedencyBetween
}