11export default class Graph {
22 /**
3- * @param isDirected {boolean}
3+ * @param {boolean } isDirected
44 */
55 constructor ( isDirected = false ) {
66 this . vertices = { } ;
77 this . isDirected = isDirected ;
88 }
99
1010 /**
11- * @param newVertex {GraphVertex}
11+ * @param {GraphVertex } newVertex
1212 * @returns {Graph }
1313 */
1414 addVertex ( newVertex ) {
@@ -18,15 +18,15 @@ export default class Graph {
1818 }
1919
2020 /**
21- * @param vertexKey {string}
21+ * @param {string } vertexKey
2222 * @returns GraphVertex
2323 */
2424 getVertexByKey ( vertexKey ) {
2525 return this . vertices [ vertexKey ] ;
2626 }
2727
2828 /**
29- * @param edge {GraphEdge}
29+ * @param {GraphEdge } edge
3030 * @returns {Graph }
3131 */
3232 addEdge ( edge ) {
@@ -62,16 +62,16 @@ export default class Graph {
6262 }
6363
6464 /**
65- * @param startVertex {GraphVertex}
66- * @param endVertex {GraphVertex}
65+ * @param {GraphVertex } startVertex
66+ * @param {GraphVertex } endVertex
6767 */
6868 findEdge ( startVertex , endVertex ) {
6969 const vertex = this . getVertexByKey ( startVertex . getKey ( ) ) ;
7070 return vertex . findEdge ( endVertex ) ;
7171 }
7272
7373 /**
74- * @param vertexKey {string}
74+ * @param {string } vertexKey
7575 * @returns {GraphVertex }
7676 */
7777 findVertexByKey ( vertexKey ) {
0 commit comments