diff --git a/README.md b/README.md index 420688b..c6a1579 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,11 @@ I use the following keywords: From newest to oldest: +# 0.4.0 +- Fixed bug with `MultiGraphAdapter`: `#getLabelledEdge()` updated incorrectly. +- Added an additional method `#contractLabeledEdge`, While `#contractEdge` contract all edges (irrespective of their label) between two vertices, `#contractEdge` contracts just one particular edge with a specific label. Note that since cycle are forbidden, a certain labeled edge between two vertices can only be contracted if it is the only edge between those two vertices. `#contractLabeled` refuses two contract in such a case, while `#contractVertices` contract all edges. You can check with `#canContractEdge` and `#canContractLabeledEdge`. +- Removed deprecated `MultiGraphAdapter#addLabeledEdge(from: TVertex, to: TVertex, label?: TEdgeLabel, data?: TEdgeData): boolean` + # 0.3.0 - Added `Algorithm#findWeaklyConnectedComponents`. - Added a `getEdgesWithData`, `getEdgesWithDataFrom`, `getEdgesWithDataTo` method when both the edge and its data are needed. diff --git a/docs/assets/js/search.js b/docs/assets/js/search.js index 0d8c644..cd8670c 100644 --- a/docs/assets/js/search.js +++ b/docs/assets/js/search.js @@ -1,3 +1,3 @@ var typedoc = typedoc || {}; typedoc.search = typedoc.search || {}; - typedoc.search.data = {"kinds":{"32":"Variable","64":"Function","128":"Class","256":"Interface","512":"Constructor","1024":"Property","2048":"Method","65536":"Type literal","262144":"Accessor","2097152":"Object literal","4194304":"Type alias"},"rows":[{"id":0,"kind":256,"name":"VertexData","url":"interfaces/vertexdata.html","classes":"tsd-kind-interface"},{"id":1,"kind":1024,"name":"order","url":"interfaces/vertexdata.html#order","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"VertexData"},{"id":2,"kind":1024,"name":"visited","url":"interfaces/vertexdata.html#visited","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"VertexData"},{"id":3,"kind":256,"name":"GenericGraphAdapterOptions","url":"interfaces/genericgraphadapteroptions.html","classes":"tsd-kind-interface tsd-has-type-parameter"},{"id":4,"kind":1024,"name":"cycleDetector","url":"interfaces/genericgraphadapteroptions.html#cycledetector","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"GenericGraphAdapterOptions"},{"id":5,"kind":1024,"name":"mapConstructor","url":"interfaces/genericgraphadapteroptions.html#mapconstructor","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"GenericGraphAdapterOptions"},{"id":6,"kind":256,"name":"MultiGraphAdapterOptions","url":"interfaces/multigraphadapteroptions.html","classes":"tsd-kind-interface tsd-has-type-parameter"},{"id":7,"kind":1024,"name":"graphFactory","url":"interfaces/multigraphadapteroptions.html#graphfactory","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"MultiGraphAdapterOptions"},{"id":8,"kind":1024,"name":"mapConstructor","url":"interfaces/multigraphadapteroptions.html#mapconstructor","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"MultiGraphAdapterOptions"},{"id":9,"kind":256,"name":"GraphlibVertexData","url":"interfaces/graphlibvertexdata.html","classes":"tsd-kind-interface"},{"id":10,"kind":1024,"name":"gid","url":"interfaces/graphlibvertexdata.html#gid","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"GraphlibVertexData"},{"id":11,"kind":1024,"name":"order","url":"interfaces/graphlibvertexdata.html#order","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"GraphlibVertexData"},{"id":12,"kind":1024,"name":"visited","url":"interfaces/graphlibvertexdata.html#visited","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"GraphlibVertexData"},{"id":13,"kind":256,"name":"GraphlibAdapterOptions","url":"interfaces/graphlibadapteroptions.html","classes":"tsd-kind-interface tsd-has-type-parameter"},{"id":14,"kind":1024,"name":"cycleDetector","url":"interfaces/graphlibadapteroptions.html#cycledetector","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"GraphlibAdapterOptions"},{"id":15,"kind":1024,"name":"graphlib","url":"interfaces/graphlibadapteroptions.html#graphlib","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"GraphlibAdapterOptions"},{"id":16,"kind":1024,"name":"graphOptions","url":"interfaces/graphlibadapteroptions.html#graphoptions","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"GraphlibAdapterOptions"},{"id":17,"kind":256,"name":"GraphAdapter","url":"interfaces/graphadapter.html","classes":"tsd-kind-interface tsd-has-type-parameter"},{"id":18,"kind":2048,"name":"getSuccessorsOf","url":"interfaces/graphadapter.html#getsuccessorsof","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"GraphAdapter"},{"id":19,"kind":2048,"name":"getPredecessorsOf","url":"interfaces/graphadapter.html#getpredecessorsof","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"GraphAdapter"},{"id":20,"kind":2048,"name":"getData","url":"interfaces/graphadapter.html#getdata","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"GraphAdapter"},{"id":21,"kind":256,"name":"CycleDetector","url":"interfaces/cycledetector.html","classes":"tsd-kind-interface tsd-has-type-parameter"},{"id":22,"kind":2048,"name":"canAddEdge","url":"interfaces/cycledetector.html#canaddedge","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CycleDetector"},{"id":23,"kind":2048,"name":"createVertexData","url":"interfaces/cycledetector.html#createvertexdata","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CycleDetector"},{"id":24,"kind":2048,"name":"getOrder","url":"interfaces/cycledetector.html#getorder","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CycleDetector"},{"id":25,"kind":2048,"name":"isReachable","url":"interfaces/cycledetector.html#isreachable","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CycleDetector"},{"id":26,"kind":2048,"name":"map","url":"interfaces/cycledetector.html#map","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"CycleDetector"},{"id":27,"kind":2048,"name":"onVertexDeletion","url":"interfaces/cycledetector.html#onvertexdeletion","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CycleDetector"},{"id":28,"kind":2048,"name":"supportsOrder","url":"interfaces/cycledetector.html#supportsorder","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CycleDetector"},{"id":29,"kind":256,"name":"ClonableAdapter","url":"interfaces/clonableadapter.html","classes":"tsd-kind-interface tsd-has-type-parameter"},{"id":30,"kind":2048,"name":"clone","url":"interfaces/clonableadapter.html#clone","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"ClonableAdapter"},{"id":31,"kind":2048,"name":"map","url":"interfaces/clonableadapter.html#map","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"ClonableAdapter"},{"id":32,"kind":256,"name":"CommonAdapter","url":"interfaces/commonadapter.html","classes":"tsd-kind-interface tsd-has-type-parameter"},{"id":33,"kind":2048,"name":"addEdge","url":"interfaces/commonadapter.html#addedge","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":34,"kind":2048,"name":"addVertex","url":"interfaces/commonadapter.html#addvertex","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":35,"kind":2048,"name":"canAddEdge","url":"interfaces/commonadapter.html#canaddedge","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":36,"kind":2048,"name":"canContractEdge","url":"interfaces/commonadapter.html#cancontractedge","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":37,"kind":2048,"name":"contractEdge","url":"interfaces/commonadapter.html#contractedge","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":38,"kind":2048,"name":"deleteEdge","url":"interfaces/commonadapter.html#deleteedge","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":39,"kind":2048,"name":"deleteVertex","url":"interfaces/commonadapter.html#deletevertex","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":40,"kind":2048,"name":"getEdgeCount","url":"interfaces/commonadapter.html#getedgecount","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":41,"kind":2048,"name":"getEdgeData","url":"interfaces/commonadapter.html#getedgedata","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":42,"kind":2048,"name":"getEdgeDataTo","url":"interfaces/commonadapter.html#getedgedatato","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":43,"kind":2048,"name":"getEdgeDataFrom","url":"interfaces/commonadapter.html#getedgedatafrom","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":44,"kind":2048,"name":"getEdgesWithDataTo","url":"interfaces/commonadapter.html#getedgeswithdatato","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":45,"kind":2048,"name":"getEdgesWithDataFrom","url":"interfaces/commonadapter.html#getedgeswithdatafrom","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":46,"kind":2048,"name":"getEdges","url":"interfaces/commonadapter.html#getedges","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":47,"kind":2048,"name":"getEdgesWithData","url":"interfaces/commonadapter.html#getedgeswithdata","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":48,"kind":2048,"name":"getOrder","url":"interfaces/commonadapter.html#getorder","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":49,"kind":2048,"name":"getPredecessorsOf","url":"interfaces/commonadapter.html#getpredecessorsof","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":50,"kind":2048,"name":"getSuccessorsOf","url":"interfaces/commonadapter.html#getsuccessorsof","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":51,"kind":2048,"name":"getVertexCount","url":"interfaces/commonadapter.html#getvertexcount","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":52,"kind":2048,"name":"getVertices","url":"interfaces/commonadapter.html#getvertices","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":53,"kind":2048,"name":"hasEdge","url":"interfaces/commonadapter.html#hasedge","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":54,"kind":2048,"name":"hasVertex","url":"interfaces/commonadapter.html#hasvertex","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":55,"kind":2048,"name":"isReachable","url":"interfaces/commonadapter.html#isreachable","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":56,"kind":2048,"name":"setEdgeData","url":"interfaces/commonadapter.html#setedgedata","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":57,"kind":2048,"name":"supportsOrder","url":"interfaces/commonadapter.html#supportsorder","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":58,"kind":256,"name":"WeaklyConnectedComponent","url":"interfaces/weaklyconnectedcomponent.html","classes":"tsd-kind-interface tsd-has-type-parameter"},{"id":59,"kind":1024,"name":"edges","url":"interfaces/weaklyconnectedcomponent.html#edges","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WeaklyConnectedComponent"},{"id":60,"kind":1024,"name":"vertices","url":"interfaces/weaklyconnectedcomponent.html#vertices","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WeaklyConnectedComponent"},{"id":61,"kind":4194304,"name":"MultiGraphEdgeData","url":"globals.html#multigraphedgedata","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":62,"kind":4194304,"name":"GraphFactory","url":"globals.html#graphfactory","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":63,"kind":65536,"name":"__type","url":"globals.html#graphfactory.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"GraphFactory"},{"id":64,"kind":4194304,"name":"GraphlibConstructor","url":"globals.html#graphlibconstructor","classes":"tsd-kind-type-alias"},{"id":65,"kind":65536,"name":"__type","url":"globals.html#graphlibconstructor.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"GraphlibConstructor"},{"id":66,"kind":64,"name":"takeFirst","url":"globals.html#takefirst","classes":"tsd-kind-function tsd-has-type-parameter tsd-is-private"},{"id":67,"kind":2097152,"name":"DoneIteratorResult","url":"globals.html#doneiteratorresult","classes":"tsd-kind-object-literal tsd-is-private"},{"id":68,"kind":32,"name":"done","url":"globals.html#doneiteratorresult.done","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"DoneIteratorResult"},{"id":69,"kind":32,"name":"value","url":"globals.html#doneiteratorresult.value","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"DoneIteratorResult"},{"id":70,"kind":2097152,"name":"EmptyIterator","url":"globals.html#emptyiterator","classes":"tsd-kind-object-literal tsd-is-private"},{"id":71,"kind":64,"name":"next","url":"globals.html#emptyiterator.next","classes":"tsd-kind-function tsd-parent-kind-object-literal","parent":"EmptyIterator"},{"id":72,"kind":64,"name":"assign","url":"globals.html#assign","classes":"tsd-kind-function tsd-has-type-parameter tsd-is-private"},{"id":73,"kind":64,"name":"toArray","url":"globals.html#toarray","classes":"tsd-kind-function tsd-has-type-parameter tsd-is-private"},{"id":74,"kind":64,"name":"createMappedIterator","url":"globals.html#createmappediterator","classes":"tsd-kind-function tsd-has-type-parameter tsd-is-private"},{"id":75,"kind":64,"name":"createFilteredIterator","url":"globals.html#createfilterediterator","classes":"tsd-kind-function tsd-has-type-parameter tsd-is-private"},{"id":76,"kind":64,"name":"createChainedIterator","url":"globals.html#createchainediterator","classes":"tsd-kind-function tsd-has-type-parameter tsd-is-private"},{"id":77,"kind":64,"name":"createFlatMappedIterator","url":"globals.html#createflatmappediterator","classes":"tsd-kind-function tsd-has-type-parameter tsd-is-private"},{"id":78,"kind":64,"name":"createArrayIterator","url":"globals.html#createarrayiterator","classes":"tsd-kind-function tsd-has-type-parameter tsd-is-private"},{"id":79,"kind":64,"name":"createMappedArrayIterator","url":"globals.html#createmappedarrayiterator","classes":"tsd-kind-function tsd-has-type-parameter tsd-is-private"},{"id":80,"kind":64,"name":"canContractEdge","url":"globals.html#cancontractedge","classes":"tsd-kind-function tsd-has-type-parameter tsd-is-private"},{"id":81,"kind":64,"name":"contractEdge","url":"globals.html#contractedge","classes":"tsd-kind-function tsd-has-type-parameter tsd-is-private"},{"id":82,"kind":32,"name":"DummyDetector","url":"globals.html#dummydetector","classes":"tsd-kind-variable tsd-is-private"},{"id":83,"kind":128,"name":"Algorithm","url":"classes/algorithm.html","classes":"tsd-kind-class"},{"id":84,"kind":2048,"name":"findWeaklyConnectedComponents","url":"classes/algorithm.html#findweaklyconnectedcomponents","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"Algorithm"},{"id":85,"kind":2048,"name":"getNeighbors","url":"classes/algorithm.html#getneighbors","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"Algorithm"},{"id":86,"kind":128,"name":"PearceKellyDetector","url":"classes/pearcekellydetector.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":87,"kind":512,"name":"constructor","url":"classes/pearcekellydetector.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"PearceKellyDetector"},{"id":88,"kind":2048,"name":"map","url":"classes/pearcekellydetector.html#map","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"PearceKellyDetector"},{"id":89,"kind":2048,"name":"isReachable","url":"classes/pearcekellydetector.html#isreachable","classes":"tsd-kind-method tsd-parent-kind-class","parent":"PearceKellyDetector"},{"id":90,"kind":2048,"name":"createVertexData","url":"classes/pearcekellydetector.html#createvertexdata","classes":"tsd-kind-method tsd-parent-kind-class","parent":"PearceKellyDetector"},{"id":91,"kind":2048,"name":"onVertexDeletion","url":"classes/pearcekellydetector.html#onvertexdeletion","classes":"tsd-kind-method tsd-parent-kind-class","parent":"PearceKellyDetector"},{"id":92,"kind":2048,"name":"canAddEdge","url":"classes/pearcekellydetector.html#canaddedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"PearceKellyDetector"},{"id":93,"kind":2048,"name":"supportsOrder","url":"classes/pearcekellydetector.html#supportsorder","classes":"tsd-kind-method tsd-parent-kind-class","parent":"PearceKellyDetector"},{"id":94,"kind":2048,"name":"getOrder","url":"classes/pearcekellydetector.html#getorder","classes":"tsd-kind-method tsd-parent-kind-class","parent":"PearceKellyDetector"},{"id":95,"kind":128,"name":"GenericGraphAdapter","url":"classes/genericgraphadapter.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":96,"kind":2048,"name":"create","url":"classes/genericgraphadapter.html#create","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"GenericGraphAdapter"},{"id":97,"kind":2048,"name":"map","url":"classes/genericgraphadapter.html#map","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"GenericGraphAdapter"},{"id":98,"kind":2048,"name":"clone","url":"classes/genericgraphadapter.html#clone","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":99,"kind":2048,"name":"canContractEdge","url":"classes/genericgraphadapter.html#cancontractedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":100,"kind":2048,"name":"contractEdge","url":"classes/genericgraphadapter.html#contractedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":101,"kind":2048,"name":"isReachable","url":"classes/genericgraphadapter.html#isreachable","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":102,"kind":2048,"name":"getSuccessorsOf","url":"classes/genericgraphadapter.html#getsuccessorsof","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":103,"kind":2048,"name":"getPredecessorsOf","url":"classes/genericgraphadapter.html#getpredecessorsof","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":104,"kind":2048,"name":"getVertices","url":"classes/genericgraphadapter.html#getvertices","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":105,"kind":2048,"name":"getEdgeData","url":"classes/genericgraphadapter.html#getedgedata","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":106,"kind":2048,"name":"getEdgesWithDataTo","url":"classes/genericgraphadapter.html#getedgeswithdatato","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":107,"kind":2048,"name":"getEdgeDataTo","url":"classes/genericgraphadapter.html#getedgedatato","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":108,"kind":2048,"name":"getEdgesWithDataFrom","url":"classes/genericgraphadapter.html#getedgeswithdatafrom","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":109,"kind":2048,"name":"getEdgeDataFrom","url":"classes/genericgraphadapter.html#getedgedatafrom","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":110,"kind":2048,"name":"setEdgeData","url":"classes/genericgraphadapter.html#setedgedata","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":111,"kind":2048,"name":"getEdges","url":"classes/genericgraphadapter.html#getedges","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":112,"kind":2048,"name":"getEdgesWithData","url":"classes/genericgraphadapter.html#getedgeswithdata","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":113,"kind":2048,"name":"getEdgeCount","url":"classes/genericgraphadapter.html#getedgecount","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":114,"kind":2048,"name":"supportsOrder","url":"classes/genericgraphadapter.html#supportsorder","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":115,"kind":2048,"name":"getOrder","url":"classes/genericgraphadapter.html#getorder","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":116,"kind":2048,"name":"getVertexCount","url":"classes/genericgraphadapter.html#getvertexcount","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":117,"kind":2048,"name":"hasEdge","url":"classes/genericgraphadapter.html#hasedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":118,"kind":2048,"name":"hasVertex","url":"classes/genericgraphadapter.html#hasvertex","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":119,"kind":2048,"name":"canAddEdge","url":"classes/genericgraphadapter.html#canaddedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":120,"kind":2048,"name":"addEdge","url":"classes/genericgraphadapter.html#addedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":121,"kind":2048,"name":"addVertex","url":"classes/genericgraphadapter.html#addvertex","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":122,"kind":2048,"name":"deleteEdge","url":"classes/genericgraphadapter.html#deleteedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":123,"kind":2048,"name":"deleteVertex","url":"classes/genericgraphadapter.html#deletevertex","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":124,"kind":128,"name":"GraphlibAdapter","url":"classes/graphlibadapter.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":125,"kind":2048,"name":"create","url":"classes/graphlibadapter.html#create","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"GraphlibAdapter"},{"id":126,"kind":2048,"name":"map","url":"classes/graphlibadapter.html#map","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"GraphlibAdapter"},{"id":127,"kind":2048,"name":"clone","url":"classes/graphlibadapter.html#clone","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":128,"kind":2048,"name":"canContractEdge","url":"classes/graphlibadapter.html#cancontractedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":129,"kind":2048,"name":"contractEdge","url":"classes/graphlibadapter.html#contractedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":130,"kind":2048,"name":"isReachable","url":"classes/graphlibadapter.html#isreachable","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":131,"kind":2048,"name":"getSuccessorsOf","url":"classes/graphlibadapter.html#getsuccessorsof","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":132,"kind":2048,"name":"getPredecessorsOf","url":"classes/graphlibadapter.html#getpredecessorsof","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":133,"kind":2048,"name":"hasEdge","url":"classes/graphlibadapter.html#hasedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":134,"kind":2048,"name":"hasVertex","url":"classes/graphlibadapter.html#hasvertex","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":135,"kind":2048,"name":"getVertexCount","url":"classes/graphlibadapter.html#getvertexcount","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":136,"kind":2048,"name":"getEdgeCount","url":"classes/graphlibadapter.html#getedgecount","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":137,"kind":2048,"name":"getEdgesWithDataFrom","url":"classes/graphlibadapter.html#getedgeswithdatafrom","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":138,"kind":2048,"name":"getEdgeDataFrom","url":"classes/graphlibadapter.html#getedgedatafrom","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":139,"kind":2048,"name":"getEdgesWithDataTo","url":"classes/graphlibadapter.html#getedgeswithdatato","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":140,"kind":2048,"name":"getEdgeDataTo","url":"classes/graphlibadapter.html#getedgedatato","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":141,"kind":2048,"name":"getEdgeData","url":"classes/graphlibadapter.html#getedgedata","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":142,"kind":2048,"name":"setEdgeData","url":"classes/graphlibadapter.html#setedgedata","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":143,"kind":2048,"name":"getVertices","url":"classes/graphlibadapter.html#getvertices","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":144,"kind":2048,"name":"getEdges","url":"classes/graphlibadapter.html#getedges","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":145,"kind":2048,"name":"getEdgesWithData","url":"classes/graphlibadapter.html#getedgeswithdata","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":146,"kind":2048,"name":"supportsOrder","url":"classes/graphlibadapter.html#supportsorder","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":147,"kind":2048,"name":"getOrder","url":"classes/graphlibadapter.html#getorder","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":148,"kind":262144,"name":"graph","url":"classes/graphlibadapter.html#graph","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":149,"kind":2048,"name":"canAddEdge","url":"classes/graphlibadapter.html#canaddedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":150,"kind":2048,"name":"addEdge","url":"classes/graphlibadapter.html#addedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":151,"kind":2048,"name":"createVertex","url":"classes/graphlibadapter.html#createvertex","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":152,"kind":2048,"name":"addVertex","url":"classes/graphlibadapter.html#addvertex","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":153,"kind":2048,"name":"deleteEdge","url":"classes/graphlibadapter.html#deleteedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":154,"kind":2048,"name":"deleteVertex","url":"classes/graphlibadapter.html#deletevertex","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":155,"kind":128,"name":"MultiGraphAdapter","url":"classes/multigraphadapter.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":156,"kind":2048,"name":"create","url":"classes/multigraphadapter.html#create","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"MultiGraphAdapter"},{"id":157,"kind":2048,"name":"mapLabeled","url":"classes/multigraphadapter.html#maplabeled","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"MultiGraphAdapter"},{"id":158,"kind":2048,"name":"map","url":"classes/multigraphadapter.html#map","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"MultiGraphAdapter"},{"id":159,"kind":2048,"name":"clone","url":"classes/multigraphadapter.html#clone","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":160,"kind":2048,"name":"addLabeledEdge","url":"classes/multigraphadapter.html#addlabelededge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":161,"kind":2048,"name":"canAddEdge","url":"classes/multigraphadapter.html#canaddedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":162,"kind":2048,"name":"addEdge","url":"classes/multigraphadapter.html#addedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":163,"kind":2048,"name":"addVertex","url":"classes/multigraphadapter.html#addvertex","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":164,"kind":2048,"name":"getEdgesWithDataTo","url":"classes/multigraphadapter.html#getedgeswithdatato","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":165,"kind":2048,"name":"getEdgesWithDataFrom","url":"classes/multigraphadapter.html#getedgeswithdatafrom","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":166,"kind":2048,"name":"getEdgeDataTo","url":"classes/multigraphadapter.html#getedgedatato","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":167,"kind":2048,"name":"getEdgeDataFrom","url":"classes/multigraphadapter.html#getedgedatafrom","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":168,"kind":2048,"name":"contractEdge","url":"classes/multigraphadapter.html#contractedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":169,"kind":2048,"name":"canContractEdge","url":"classes/multigraphadapter.html#cancontractedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":170,"kind":2048,"name":"deleteLabeledEdge","url":"classes/multigraphadapter.html#deletelabelededge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":171,"kind":2048,"name":"deleteEdge","url":"classes/multigraphadapter.html#deleteedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":172,"kind":2048,"name":"deleteVertex","url":"classes/multigraphadapter.html#deletevertex","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":173,"kind":2048,"name":"getLabeledEdgeCount","url":"classes/multigraphadapter.html#getlabelededgecount","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":174,"kind":2048,"name":"getEdgeCount","url":"classes/multigraphadapter.html#getedgecount","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":175,"kind":2048,"name":"getEdgeData","url":"classes/multigraphadapter.html#getedgedata","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":176,"kind":2048,"name":"setEdgeData","url":"classes/multigraphadapter.html#setedgedata","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":177,"kind":2048,"name":"getEdges","url":"classes/multigraphadapter.html#getedges","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":178,"kind":2048,"name":"getEdgesWithData","url":"classes/multigraphadapter.html#getedgeswithdata","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":179,"kind":2048,"name":"getLabeledEdgesWithData","url":"classes/multigraphadapter.html#getlabelededgeswithdata","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":180,"kind":2048,"name":"getEdgeCountBetween","url":"classes/multigraphadapter.html#getedgecountbetween","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":181,"kind":2048,"name":"getEdgeLabels","url":"classes/multigraphadapter.html#getedgelabels","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":182,"kind":2048,"name":"getLabeledEdges","url":"classes/multigraphadapter.html#getlabelededges","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":183,"kind":2048,"name":"getPredecessorsOf","url":"classes/multigraphadapter.html#getpredecessorsof","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":184,"kind":2048,"name":"getSuccessorsOf","url":"classes/multigraphadapter.html#getsuccessorsof","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":185,"kind":2048,"name":"getOrder","url":"classes/multigraphadapter.html#getorder","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":186,"kind":2048,"name":"supportsOrder","url":"classes/multigraphadapter.html#supportsorder","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":187,"kind":2048,"name":"getVertexCount","url":"classes/multigraphadapter.html#getvertexcount","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":188,"kind":2048,"name":"getVertices","url":"classes/multigraphadapter.html#getvertices","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":189,"kind":2048,"name":"hasEdge","url":"classes/multigraphadapter.html#hasedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":190,"kind":2048,"name":"hasLabeledEdge","url":"classes/multigraphadapter.html#haslabelededge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":191,"kind":2048,"name":"hasVertex","url":"classes/multigraphadapter.html#hasvertex","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":192,"kind":2048,"name":"isReachable","url":"classes/multigraphadapter.html#isreachable","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"}]}; \ No newline at end of file + typedoc.search.data = {"kinds":{"32":"Variable","64":"Function","128":"Class","256":"Interface","512":"Constructor","1024":"Property","2048":"Method","65536":"Type literal","262144":"Accessor","2097152":"Object literal","4194304":"Type alias"},"rows":[{"id":0,"kind":256,"name":"VertexData","url":"interfaces/vertexdata.html","classes":"tsd-kind-interface"},{"id":1,"kind":1024,"name":"order","url":"interfaces/vertexdata.html#order","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"VertexData"},{"id":2,"kind":1024,"name":"visited","url":"interfaces/vertexdata.html#visited","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"VertexData"},{"id":3,"kind":256,"name":"GenericGraphAdapterOptions","url":"interfaces/genericgraphadapteroptions.html","classes":"tsd-kind-interface tsd-has-type-parameter"},{"id":4,"kind":1024,"name":"cycleDetector","url":"interfaces/genericgraphadapteroptions.html#cycledetector","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"GenericGraphAdapterOptions"},{"id":5,"kind":1024,"name":"mapConstructor","url":"interfaces/genericgraphadapteroptions.html#mapconstructor","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"GenericGraphAdapterOptions"},{"id":6,"kind":256,"name":"MultiGraphAdapterOptions","url":"interfaces/multigraphadapteroptions.html","classes":"tsd-kind-interface tsd-has-type-parameter"},{"id":7,"kind":1024,"name":"graphFactory","url":"interfaces/multigraphadapteroptions.html#graphfactory","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"MultiGraphAdapterOptions"},{"id":8,"kind":1024,"name":"mapConstructor","url":"interfaces/multigraphadapteroptions.html#mapconstructor","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"MultiGraphAdapterOptions"},{"id":9,"kind":256,"name":"GraphlibVertexData","url":"interfaces/graphlibvertexdata.html","classes":"tsd-kind-interface"},{"id":10,"kind":1024,"name":"gid","url":"interfaces/graphlibvertexdata.html#gid","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"GraphlibVertexData"},{"id":11,"kind":1024,"name":"order","url":"interfaces/graphlibvertexdata.html#order","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"GraphlibVertexData"},{"id":12,"kind":1024,"name":"visited","url":"interfaces/graphlibvertexdata.html#visited","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"GraphlibVertexData"},{"id":13,"kind":256,"name":"GraphlibAdapterOptions","url":"interfaces/graphlibadapteroptions.html","classes":"tsd-kind-interface tsd-has-type-parameter"},{"id":14,"kind":1024,"name":"cycleDetector","url":"interfaces/graphlibadapteroptions.html#cycledetector","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"GraphlibAdapterOptions"},{"id":15,"kind":1024,"name":"graphlib","url":"interfaces/graphlibadapteroptions.html#graphlib","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"GraphlibAdapterOptions"},{"id":16,"kind":1024,"name":"graphOptions","url":"interfaces/graphlibadapteroptions.html#graphoptions","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"GraphlibAdapterOptions"},{"id":17,"kind":256,"name":"GraphAdapter","url":"interfaces/graphadapter.html","classes":"tsd-kind-interface tsd-has-type-parameter"},{"id":18,"kind":2048,"name":"getSuccessorsOf","url":"interfaces/graphadapter.html#getsuccessorsof","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"GraphAdapter"},{"id":19,"kind":2048,"name":"getPredecessorsOf","url":"interfaces/graphadapter.html#getpredecessorsof","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"GraphAdapter"},{"id":20,"kind":2048,"name":"getData","url":"interfaces/graphadapter.html#getdata","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"GraphAdapter"},{"id":21,"kind":256,"name":"CycleDetector","url":"interfaces/cycledetector.html","classes":"tsd-kind-interface tsd-has-type-parameter"},{"id":22,"kind":2048,"name":"canAddEdge","url":"interfaces/cycledetector.html#canaddedge","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CycleDetector"},{"id":23,"kind":2048,"name":"createVertexData","url":"interfaces/cycledetector.html#createvertexdata","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CycleDetector"},{"id":24,"kind":2048,"name":"getOrder","url":"interfaces/cycledetector.html#getorder","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CycleDetector"},{"id":25,"kind":2048,"name":"isReachable","url":"interfaces/cycledetector.html#isreachable","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CycleDetector"},{"id":26,"kind":2048,"name":"map","url":"interfaces/cycledetector.html#map","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"CycleDetector"},{"id":27,"kind":2048,"name":"onVertexDeletion","url":"interfaces/cycledetector.html#onvertexdeletion","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CycleDetector"},{"id":28,"kind":2048,"name":"supportsOrder","url":"interfaces/cycledetector.html#supportsorder","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CycleDetector"},{"id":29,"kind":256,"name":"ClonableAdapter","url":"interfaces/clonableadapter.html","classes":"tsd-kind-interface tsd-has-type-parameter"},{"id":30,"kind":2048,"name":"clone","url":"interfaces/clonableadapter.html#clone","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"ClonableAdapter"},{"id":31,"kind":2048,"name":"map","url":"interfaces/clonableadapter.html#map","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"ClonableAdapter"},{"id":32,"kind":256,"name":"CommonAdapter","url":"interfaces/commonadapter.html","classes":"tsd-kind-interface tsd-has-type-parameter"},{"id":33,"kind":2048,"name":"addEdge","url":"interfaces/commonadapter.html#addedge","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":34,"kind":2048,"name":"addVertex","url":"interfaces/commonadapter.html#addvertex","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":35,"kind":2048,"name":"canAddEdge","url":"interfaces/commonadapter.html#canaddedge","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":36,"kind":2048,"name":"canContractEdge","url":"interfaces/commonadapter.html#cancontractedge","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":37,"kind":2048,"name":"contractEdge","url":"interfaces/commonadapter.html#contractedge","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":38,"kind":2048,"name":"deleteEdge","url":"interfaces/commonadapter.html#deleteedge","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":39,"kind":2048,"name":"deleteVertex","url":"interfaces/commonadapter.html#deletevertex","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":40,"kind":2048,"name":"getEdgeCount","url":"interfaces/commonadapter.html#getedgecount","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":41,"kind":2048,"name":"getEdgeData","url":"interfaces/commonadapter.html#getedgedata","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":42,"kind":2048,"name":"getEdgeDataTo","url":"interfaces/commonadapter.html#getedgedatato","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":43,"kind":2048,"name":"getEdgeDataFrom","url":"interfaces/commonadapter.html#getedgedatafrom","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":44,"kind":2048,"name":"getEdgesWithDataTo","url":"interfaces/commonadapter.html#getedgeswithdatato","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":45,"kind":2048,"name":"getEdgesWithDataFrom","url":"interfaces/commonadapter.html#getedgeswithdatafrom","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":46,"kind":2048,"name":"getEdges","url":"interfaces/commonadapter.html#getedges","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":47,"kind":2048,"name":"getEdgesWithData","url":"interfaces/commonadapter.html#getedgeswithdata","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":48,"kind":2048,"name":"getOrder","url":"interfaces/commonadapter.html#getorder","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":49,"kind":2048,"name":"getPredecessorsOf","url":"interfaces/commonadapter.html#getpredecessorsof","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":50,"kind":2048,"name":"getSuccessorsOf","url":"interfaces/commonadapter.html#getsuccessorsof","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":51,"kind":2048,"name":"getVertexCount","url":"interfaces/commonadapter.html#getvertexcount","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":52,"kind":2048,"name":"getVertices","url":"interfaces/commonadapter.html#getvertices","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":53,"kind":2048,"name":"hasEdge","url":"interfaces/commonadapter.html#hasedge","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":54,"kind":2048,"name":"hasVertex","url":"interfaces/commonadapter.html#hasvertex","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":55,"kind":2048,"name":"isReachable","url":"interfaces/commonadapter.html#isreachable","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":56,"kind":2048,"name":"setEdgeData","url":"interfaces/commonadapter.html#setedgedata","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":57,"kind":2048,"name":"supportsOrder","url":"interfaces/commonadapter.html#supportsorder","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"CommonAdapter"},{"id":58,"kind":256,"name":"WeaklyConnectedComponent","url":"interfaces/weaklyconnectedcomponent.html","classes":"tsd-kind-interface tsd-has-type-parameter"},{"id":59,"kind":1024,"name":"edges","url":"interfaces/weaklyconnectedcomponent.html#edges","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WeaklyConnectedComponent"},{"id":60,"kind":1024,"name":"vertices","url":"interfaces/weaklyconnectedcomponent.html#vertices","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WeaklyConnectedComponent"},{"id":61,"kind":4194304,"name":"LabelGenerator","url":"globals.html#labelgenerator","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":62,"kind":4194304,"name":"MultiGraphEdgeData","url":"globals.html#multigraphedgedata","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":63,"kind":4194304,"name":"GraphFactory","url":"globals.html#graphfactory","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":64,"kind":65536,"name":"__type","url":"globals.html#graphfactory.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"GraphFactory"},{"id":65,"kind":4194304,"name":"GraphlibConstructor","url":"globals.html#graphlibconstructor","classes":"tsd-kind-type-alias"},{"id":66,"kind":65536,"name":"__type","url":"globals.html#graphlibconstructor.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias tsd-is-not-exported","parent":"GraphlibConstructor"},{"id":67,"kind":64,"name":"takeFirst","url":"globals.html#takefirst","classes":"tsd-kind-function tsd-has-type-parameter tsd-is-private"},{"id":68,"kind":2097152,"name":"DoneIteratorResult","url":"globals.html#doneiteratorresult","classes":"tsd-kind-object-literal tsd-is-private"},{"id":69,"kind":32,"name":"done","url":"globals.html#doneiteratorresult.done","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"DoneIteratorResult"},{"id":70,"kind":32,"name":"value","url":"globals.html#doneiteratorresult.value","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"DoneIteratorResult"},{"id":71,"kind":2097152,"name":"EmptyIterator","url":"globals.html#emptyiterator","classes":"tsd-kind-object-literal tsd-is-private"},{"id":72,"kind":64,"name":"next","url":"globals.html#emptyiterator.next","classes":"tsd-kind-function tsd-parent-kind-object-literal","parent":"EmptyIterator"},{"id":73,"kind":64,"name":"assign","url":"globals.html#assign","classes":"tsd-kind-function tsd-has-type-parameter tsd-is-private"},{"id":74,"kind":64,"name":"toArray","url":"globals.html#toarray","classes":"tsd-kind-function tsd-has-type-parameter tsd-is-private"},{"id":75,"kind":64,"name":"forEach","url":"globals.html#foreach","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":76,"kind":64,"name":"combineIterators","url":"globals.html#combineiterators","classes":"tsd-kind-function tsd-has-type-parameter"},{"id":77,"kind":64,"name":"createMappedIterator","url":"globals.html#createmappediterator","classes":"tsd-kind-function tsd-has-type-parameter tsd-is-private"},{"id":78,"kind":64,"name":"createFilteredIterator","url":"globals.html#createfilterediterator","classes":"tsd-kind-function tsd-has-type-parameter tsd-is-private"},{"id":79,"kind":64,"name":"createChainedIterator","url":"globals.html#createchainediterator","classes":"tsd-kind-function tsd-has-type-parameter tsd-is-private"},{"id":80,"kind":64,"name":"createFlatMappedIterator","url":"globals.html#createflatmappediterator","classes":"tsd-kind-function tsd-has-type-parameter tsd-is-private"},{"id":81,"kind":64,"name":"createArrayIterator","url":"globals.html#createarrayiterator","classes":"tsd-kind-function tsd-has-type-parameter tsd-is-private"},{"id":82,"kind":64,"name":"createMappedArrayIterator","url":"globals.html#createmappedarrayiterator","classes":"tsd-kind-function tsd-has-type-parameter tsd-is-private"},{"id":83,"kind":64,"name":"canContractEdge","url":"globals.html#cancontractedge","classes":"tsd-kind-function tsd-has-type-parameter tsd-is-private"},{"id":84,"kind":64,"name":"contractEdge","url":"globals.html#contractedge","classes":"tsd-kind-function tsd-has-type-parameter tsd-is-private"},{"id":85,"kind":32,"name":"DummyDetector","url":"globals.html#dummydetector","classes":"tsd-kind-variable tsd-is-private"},{"id":86,"kind":128,"name":"Algorithm","url":"classes/algorithm.html","classes":"tsd-kind-class"},{"id":87,"kind":2048,"name":"findWeaklyConnectedComponents","url":"classes/algorithm.html#findweaklyconnectedcomponents","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"Algorithm"},{"id":88,"kind":2048,"name":"getNeighbors","url":"classes/algorithm.html#getneighbors","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"Algorithm"},{"id":89,"kind":128,"name":"PearceKellyDetector","url":"classes/pearcekellydetector.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":90,"kind":512,"name":"constructor","url":"classes/pearcekellydetector.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"PearceKellyDetector"},{"id":91,"kind":2048,"name":"map","url":"classes/pearcekellydetector.html#map","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"PearceKellyDetector"},{"id":92,"kind":2048,"name":"isReachable","url":"classes/pearcekellydetector.html#isreachable","classes":"tsd-kind-method tsd-parent-kind-class","parent":"PearceKellyDetector"},{"id":93,"kind":2048,"name":"createVertexData","url":"classes/pearcekellydetector.html#createvertexdata","classes":"tsd-kind-method tsd-parent-kind-class","parent":"PearceKellyDetector"},{"id":94,"kind":2048,"name":"onVertexDeletion","url":"classes/pearcekellydetector.html#onvertexdeletion","classes":"tsd-kind-method tsd-parent-kind-class","parent":"PearceKellyDetector"},{"id":95,"kind":2048,"name":"canAddEdge","url":"classes/pearcekellydetector.html#canaddedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"PearceKellyDetector"},{"id":96,"kind":2048,"name":"supportsOrder","url":"classes/pearcekellydetector.html#supportsorder","classes":"tsd-kind-method tsd-parent-kind-class","parent":"PearceKellyDetector"},{"id":97,"kind":2048,"name":"getOrder","url":"classes/pearcekellydetector.html#getorder","classes":"tsd-kind-method tsd-parent-kind-class","parent":"PearceKellyDetector"},{"id":98,"kind":128,"name":"GenericGraphAdapter","url":"classes/genericgraphadapter.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":99,"kind":2048,"name":"create","url":"classes/genericgraphadapter.html#create","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"GenericGraphAdapter"},{"id":100,"kind":2048,"name":"map","url":"classes/genericgraphadapter.html#map","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"GenericGraphAdapter"},{"id":101,"kind":2048,"name":"clone","url":"classes/genericgraphadapter.html#clone","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":102,"kind":2048,"name":"canContractEdge","url":"classes/genericgraphadapter.html#cancontractedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":103,"kind":2048,"name":"contractEdge","url":"classes/genericgraphadapter.html#contractedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":104,"kind":2048,"name":"isReachable","url":"classes/genericgraphadapter.html#isreachable","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":105,"kind":2048,"name":"getSuccessorsOf","url":"classes/genericgraphadapter.html#getsuccessorsof","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":106,"kind":2048,"name":"getPredecessorsOf","url":"classes/genericgraphadapter.html#getpredecessorsof","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":107,"kind":2048,"name":"getVertices","url":"classes/genericgraphadapter.html#getvertices","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":108,"kind":2048,"name":"getEdgeData","url":"classes/genericgraphadapter.html#getedgedata","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":109,"kind":2048,"name":"getEdgesWithDataTo","url":"classes/genericgraphadapter.html#getedgeswithdatato","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":110,"kind":2048,"name":"getEdgeDataTo","url":"classes/genericgraphadapter.html#getedgedatato","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":111,"kind":2048,"name":"getEdgesWithDataFrom","url":"classes/genericgraphadapter.html#getedgeswithdatafrom","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":112,"kind":2048,"name":"getEdgeDataFrom","url":"classes/genericgraphadapter.html#getedgedatafrom","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":113,"kind":2048,"name":"setEdgeData","url":"classes/genericgraphadapter.html#setedgedata","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":114,"kind":2048,"name":"getEdges","url":"classes/genericgraphadapter.html#getedges","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":115,"kind":2048,"name":"getEdgesWithData","url":"classes/genericgraphadapter.html#getedgeswithdata","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":116,"kind":2048,"name":"getEdgeCount","url":"classes/genericgraphadapter.html#getedgecount","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":117,"kind":2048,"name":"supportsOrder","url":"classes/genericgraphadapter.html#supportsorder","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":118,"kind":2048,"name":"getOrder","url":"classes/genericgraphadapter.html#getorder","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":119,"kind":2048,"name":"getVertexCount","url":"classes/genericgraphadapter.html#getvertexcount","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":120,"kind":2048,"name":"hasEdge","url":"classes/genericgraphadapter.html#hasedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":121,"kind":2048,"name":"hasVertex","url":"classes/genericgraphadapter.html#hasvertex","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":122,"kind":2048,"name":"canAddEdge","url":"classes/genericgraphadapter.html#canaddedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":123,"kind":2048,"name":"addEdge","url":"classes/genericgraphadapter.html#addedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":124,"kind":2048,"name":"addVertex","url":"classes/genericgraphadapter.html#addvertex","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":125,"kind":2048,"name":"deleteEdge","url":"classes/genericgraphadapter.html#deleteedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":126,"kind":2048,"name":"deleteVertex","url":"classes/genericgraphadapter.html#deletevertex","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GenericGraphAdapter"},{"id":127,"kind":128,"name":"GraphlibAdapter","url":"classes/graphlibadapter.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":128,"kind":2048,"name":"create","url":"classes/graphlibadapter.html#create","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"GraphlibAdapter"},{"id":129,"kind":2048,"name":"map","url":"classes/graphlibadapter.html#map","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"GraphlibAdapter"},{"id":130,"kind":2048,"name":"clone","url":"classes/graphlibadapter.html#clone","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":131,"kind":2048,"name":"canContractEdge","url":"classes/graphlibadapter.html#cancontractedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":132,"kind":2048,"name":"contractEdge","url":"classes/graphlibadapter.html#contractedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":133,"kind":2048,"name":"isReachable","url":"classes/graphlibadapter.html#isreachable","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":134,"kind":2048,"name":"getSuccessorsOf","url":"classes/graphlibadapter.html#getsuccessorsof","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":135,"kind":2048,"name":"getPredecessorsOf","url":"classes/graphlibadapter.html#getpredecessorsof","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":136,"kind":2048,"name":"hasEdge","url":"classes/graphlibadapter.html#hasedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":137,"kind":2048,"name":"hasVertex","url":"classes/graphlibadapter.html#hasvertex","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":138,"kind":2048,"name":"getVertexCount","url":"classes/graphlibadapter.html#getvertexcount","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":139,"kind":2048,"name":"getEdgeCount","url":"classes/graphlibadapter.html#getedgecount","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":140,"kind":2048,"name":"getEdgesWithDataFrom","url":"classes/graphlibadapter.html#getedgeswithdatafrom","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":141,"kind":2048,"name":"getEdgeDataFrom","url":"classes/graphlibadapter.html#getedgedatafrom","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":142,"kind":2048,"name":"getEdgesWithDataTo","url":"classes/graphlibadapter.html#getedgeswithdatato","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":143,"kind":2048,"name":"getEdgeDataTo","url":"classes/graphlibadapter.html#getedgedatato","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":144,"kind":2048,"name":"getEdgeData","url":"classes/graphlibadapter.html#getedgedata","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":145,"kind":2048,"name":"setEdgeData","url":"classes/graphlibadapter.html#setedgedata","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":146,"kind":2048,"name":"getVertices","url":"classes/graphlibadapter.html#getvertices","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":147,"kind":2048,"name":"getEdges","url":"classes/graphlibadapter.html#getedges","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":148,"kind":2048,"name":"getEdgesWithData","url":"classes/graphlibadapter.html#getedgeswithdata","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":149,"kind":2048,"name":"supportsOrder","url":"classes/graphlibadapter.html#supportsorder","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":150,"kind":2048,"name":"getOrder","url":"classes/graphlibadapter.html#getorder","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":151,"kind":262144,"name":"graph","url":"classes/graphlibadapter.html#graph","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":152,"kind":2048,"name":"canAddEdge","url":"classes/graphlibadapter.html#canaddedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":153,"kind":2048,"name":"addEdge","url":"classes/graphlibadapter.html#addedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":154,"kind":2048,"name":"createVertex","url":"classes/graphlibadapter.html#createvertex","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":155,"kind":2048,"name":"addVertex","url":"classes/graphlibadapter.html#addvertex","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":156,"kind":2048,"name":"deleteEdge","url":"classes/graphlibadapter.html#deleteedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":157,"kind":2048,"name":"deleteVertex","url":"classes/graphlibadapter.html#deletevertex","classes":"tsd-kind-method tsd-parent-kind-class","parent":"GraphlibAdapter"},{"id":158,"kind":128,"name":"MultiGraphAdapter","url":"classes/multigraphadapter.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":159,"kind":2048,"name":"create","url":"classes/multigraphadapter.html#create","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"MultiGraphAdapter"},{"id":160,"kind":2048,"name":"mapLabeled","url":"classes/multigraphadapter.html#maplabeled","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"MultiGraphAdapter"},{"id":161,"kind":2048,"name":"map","url":"classes/multigraphadapter.html#map","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"MultiGraphAdapter"},{"id":162,"kind":2048,"name":"clone","url":"classes/multigraphadapter.html#clone","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":163,"kind":2048,"name":"addLabeledEdge","url":"classes/multigraphadapter.html#addlabelededge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":164,"kind":2048,"name":"canAddEdge","url":"classes/multigraphadapter.html#canaddedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":165,"kind":2048,"name":"addEdge","url":"classes/multigraphadapter.html#addedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":166,"kind":2048,"name":"addVertex","url":"classes/multigraphadapter.html#addvertex","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":167,"kind":2048,"name":"getEdgesWithDataTo","url":"classes/multigraphadapter.html#getedgeswithdatato","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":168,"kind":2048,"name":"getEdgesWithDataFrom","url":"classes/multigraphadapter.html#getedgeswithdatafrom","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":169,"kind":2048,"name":"getEdgeDataTo","url":"classes/multigraphadapter.html#getedgedatato","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":170,"kind":2048,"name":"getEdgeDataFrom","url":"classes/multigraphadapter.html#getedgedatafrom","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":171,"kind":2048,"name":"contractEdge","url":"classes/multigraphadapter.html#contractedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":172,"kind":2048,"name":"contractLabeledEdge","url":"classes/multigraphadapter.html#contractlabelededge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":173,"kind":2048,"name":"canContractLabeledEdge","url":"classes/multigraphadapter.html#cancontractlabelededge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":174,"kind":2048,"name":"canContractEdge","url":"classes/multigraphadapter.html#cancontractedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":175,"kind":2048,"name":"deleteLabeledEdge","url":"classes/multigraphadapter.html#deletelabelededge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":176,"kind":2048,"name":"deleteEdge","url":"classes/multigraphadapter.html#deleteedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":177,"kind":2048,"name":"deleteVertex","url":"classes/multigraphadapter.html#deletevertex","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":178,"kind":2048,"name":"getLabeledEdgeCount","url":"classes/multigraphadapter.html#getlabelededgecount","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":179,"kind":2048,"name":"getEdgeCount","url":"classes/multigraphadapter.html#getedgecount","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":180,"kind":2048,"name":"getEdgeData","url":"classes/multigraphadapter.html#getedgedata","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":181,"kind":2048,"name":"setEdgeData","url":"classes/multigraphadapter.html#setedgedata","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":182,"kind":2048,"name":"getEdges","url":"classes/multigraphadapter.html#getedges","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":183,"kind":2048,"name":"getEdgesWithData","url":"classes/multigraphadapter.html#getedgeswithdata","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":184,"kind":2048,"name":"getLabeledEdgesWithData","url":"classes/multigraphadapter.html#getlabelededgeswithdata","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":185,"kind":2048,"name":"getEdgeCountBetween","url":"classes/multigraphadapter.html#getedgecountbetween","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":186,"kind":2048,"name":"getEdgeLabels","url":"classes/multigraphadapter.html#getedgelabels","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":187,"kind":2048,"name":"getLabeledEdges","url":"classes/multigraphadapter.html#getlabelededges","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":188,"kind":2048,"name":"getPredecessorsOf","url":"classes/multigraphadapter.html#getpredecessorsof","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":189,"kind":2048,"name":"getSuccessorsOf","url":"classes/multigraphadapter.html#getsuccessorsof","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":190,"kind":2048,"name":"getOrder","url":"classes/multigraphadapter.html#getorder","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":191,"kind":2048,"name":"supportsOrder","url":"classes/multigraphadapter.html#supportsorder","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":192,"kind":2048,"name":"getVertexCount","url":"classes/multigraphadapter.html#getvertexcount","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":193,"kind":2048,"name":"getVertices","url":"classes/multigraphadapter.html#getvertices","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":194,"kind":2048,"name":"hasEdge","url":"classes/multigraphadapter.html#hasedge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":195,"kind":2048,"name":"hasLabeledEdge","url":"classes/multigraphadapter.html#haslabelededge","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":196,"kind":2048,"name":"hasVertex","url":"classes/multigraphadapter.html#hasvertex","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"},{"id":197,"kind":2048,"name":"isReachable","url":"classes/multigraphadapter.html#isreachable","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGraphAdapter"}]}; \ No newline at end of file diff --git a/docs/classes/algorithm.html b/docs/classes/algorithm.html index 4579666..a6efbc8 100644 --- a/docs/classes/algorithm.html +++ b/docs/classes/algorithm.html @@ -966,6 +966,9 @@ <li class=" tsd-kind-type-alias"> <a href="../globals.html#graphlibconstructor" class="tsd-kind-icon">Graphlib<wbr>Constructor</a> </li> + <li class=" tsd-kind-type-alias tsd-has-type-parameter"> + <a href="../globals.html#labelgenerator" class="tsd-kind-icon">Label<wbr>Generator</a> + </li> <li class=" tsd-kind-type-alias tsd-has-type-parameter"> <a href="../globals.html#multigraphedgedata" class="tsd-kind-icon">Multi<wbr>Graph<wbr>Edge<wbr>Data</a> </li> @@ -978,6 +981,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#cancontractedge" class="tsd-kind-icon">can<wbr>Contract<wbr>Edge</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#combineiterators" class="tsd-kind-icon">combine<wbr>Iterators</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#contractedge" class="tsd-kind-icon">contract<wbr>Edge</a> </li> @@ -999,6 +1005,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#createmappediterator" class="tsd-kind-icon">create<wbr>Mapped<wbr>Iterator</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#foreach" class="tsd-kind-icon">for<wbr>Each</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#takefirst" class="tsd-kind-icon">take<wbr>First</a> </li> @@ -1057,7 +1066,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> find<wbr>Weakly<wbr>Conne <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Algorithm.ts#L15">Algorithm.ts:15</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Algorithm.ts#L15">Algorithm.ts:15</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1104,7 +1113,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> get<wbr>Neighbors</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Algorithm.ts#L63">Algorithm.ts:63</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Algorithm.ts#L63">Algorithm.ts:63</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> diff --git a/docs/classes/genericgraphadapter.html b/docs/classes/genericgraphadapter.html index 52d082d..63bdf80 100644 --- a/docs/classes/genericgraphadapter.html +++ b/docs/classes/genericgraphadapter.html @@ -1044,6 +1044,9 @@ <li class=" tsd-kind-type-alias"> <a href="../globals.html#graphlibconstructor" class="tsd-kind-icon">Graphlib<wbr>Constructor</a> </li> + <li class=" tsd-kind-type-alias tsd-has-type-parameter"> + <a href="../globals.html#labelgenerator" class="tsd-kind-icon">Label<wbr>Generator</a> + </li> <li class=" tsd-kind-type-alias tsd-has-type-parameter"> <a href="../globals.html#multigraphedgedata" class="tsd-kind-icon">Multi<wbr>Graph<wbr>Edge<wbr>Data</a> </li> @@ -1056,6 +1059,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#cancontractedge" class="tsd-kind-icon">can<wbr>Contract<wbr>Edge</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#combineiterators" class="tsd-kind-icon">combine<wbr>Iterators</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#contractedge" class="tsd-kind-icon">contract<wbr>Edge</a> </li> @@ -1077,6 +1083,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#createmappediterator" class="tsd-kind-icon">create<wbr>Mapped<wbr>Iterator</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#foreach" class="tsd-kind-icon">for<wbr>Each</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#takefirst" class="tsd-kind-icon">take<wbr>First</a> </li> @@ -1100,7 +1109,7 @@ <code>Map</code>s. Allows you to associate arbitrary data with each edge. For vertex data, use an appropriate <code>TVertex</code> type.</p> </div> - <pre><code class="lang-typescript"> + <pre><code class="language-typescript"> <span class="hljs-comment">// Type of the data we want to use as vertices.</span> <span class="hljs-keyword">interface</span> Vertex { id: <span class="hljs-built_in">number</span>; @@ -1128,8 +1137,7 @@ <span class="hljs-comment">// This edge would create cycle.</span> graph.addEdge(v3, v1) <span class="hljs-comment">// => false</span> -graph.hasEdge(v3, v1) <span class="hljs-comment">// => false</span> -</code></pre> +graph.hasEdge(v3, v1) <span class="hljs-comment">// => false</span></code></pre> <dl class="tsd-comment-tags"> <dt>see</dt> <dd><p><a href="../interfaces/commonadapter.html">CommonAdapter</a></p> @@ -1226,7 +1234,7 @@ <h3>add<wbr>Edge</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#addedge">addEdge</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L269">GenericGraphAdapter.ts:269</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L269">GenericGraphAdapter.ts:269</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1256,7 +1264,7 @@ <h3>add<wbr>Vertex</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#addvertex">addVertex</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L302">GenericGraphAdapter.ts:302</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L302">GenericGraphAdapter.ts:302</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1280,7 +1288,7 @@ <h3>can<wbr>Add<wbr>Edge</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#canaddedge">canAddEdge</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L241">GenericGraphAdapter.ts:241</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L241">GenericGraphAdapter.ts:241</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1307,7 +1315,7 @@ <h3>can<wbr>Contract<wbr>Edge</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#cancontractedge">canContractEdge</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L122">GenericGraphAdapter.ts:122</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L122">GenericGraphAdapter.ts:122</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1334,7 +1342,7 @@ <h3>clone</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/clonableadapter.html">ClonableAdapter</a>.<a href="../interfaces/clonableadapter.html#clone">clone</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L116">GenericGraphAdapter.ts:116</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L116">GenericGraphAdapter.ts:116</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1361,7 +1369,7 @@ <h3>contract<wbr>Edge</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#contractedge">contractEdge</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L126">GenericGraphAdapter.ts:126</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L126">GenericGraphAdapter.ts:126</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1394,7 +1402,7 @@ <h3>delete<wbr>Edge</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#deleteedge">deleteEdge</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L310">GenericGraphAdapter.ts:310</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L310">GenericGraphAdapter.ts:310</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1421,7 +1429,7 @@ <h3>delete<wbr>Vertex</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#deletevertex">deleteVertex</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L325">GenericGraphAdapter.ts:325</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L325">GenericGraphAdapter.ts:325</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1445,7 +1453,7 @@ <h3>get<wbr>Edge<wbr>Count</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#getedgecount">getEdgeCount</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L216">GenericGraphAdapter.ts:216</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L216">GenericGraphAdapter.ts:216</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> @@ -1463,7 +1471,7 @@ <h3>get<wbr>Edge<wbr>Data</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#getedgedata">getEdgeData</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L154">GenericGraphAdapter.ts:154</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L154">GenericGraphAdapter.ts:154</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1493,7 +1501,7 @@ <h3>get<wbr>Edge<wbr>Data<wbr>From</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#getedgedatafrom">getEdgeDataFrom</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L186">GenericGraphAdapter.ts:186</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L186">GenericGraphAdapter.ts:186</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1517,7 +1525,7 @@ <h3>get<wbr>Edge<wbr>Data<wbr>To</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#getedgedatato">getEdgeDataTo</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L170">GenericGraphAdapter.ts:170</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L170">GenericGraphAdapter.ts:170</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1541,7 +1549,7 @@ <h3>get<wbr>Edges</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#getedges">getEdges</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L205">GenericGraphAdapter.ts:205</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L205">GenericGraphAdapter.ts:205</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Iterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Pair</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h4> @@ -1559,7 +1567,7 @@ <h3>get<wbr>Edges<wbr>With<wbr>Data</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#getedgeswithdata">getEdgesWithData</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L210">GenericGraphAdapter.ts:210</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L210">GenericGraphAdapter.ts:210</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Iterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Triple</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Maybe</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TEdgeData</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h4> @@ -1577,7 +1585,7 @@ <h3>get<wbr>Edges<wbr>With<wbr>Data<wbr>From</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#getedgeswithdatafrom">getEdgesWithDataFrom</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L178">GenericGraphAdapter.ts:178</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L178">GenericGraphAdapter.ts:178</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1601,7 +1609,7 @@ <h3>get<wbr>Edges<wbr>With<wbr>Data<wbr>To</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#getedgeswithdatato">getEdgesWithDataTo</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L162">GenericGraphAdapter.ts:162</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L162">GenericGraphAdapter.ts:162</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1625,7 +1633,7 @@ <h3>get<wbr>Order</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#getorder">getOrder</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L224">GenericGraphAdapter.ts:224</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L224">GenericGraphAdapter.ts:224</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1649,7 +1657,7 @@ <h3>get<wbr>Predecessors<wbr>Of</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#getpredecessorsof">getPredecessorsOf</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L142">GenericGraphAdapter.ts:142</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L142">GenericGraphAdapter.ts:142</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1673,7 +1681,7 @@ <h3>get<wbr>Successors<wbr>Of</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#getsuccessorsof">getSuccessorsOf</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L134">GenericGraphAdapter.ts:134</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L134">GenericGraphAdapter.ts:134</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1697,7 +1705,7 @@ <h3>get<wbr>Vertex<wbr>Count</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#getvertexcount">getVertexCount</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L228">GenericGraphAdapter.ts:228</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L228">GenericGraphAdapter.ts:228</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> @@ -1715,7 +1723,7 @@ <h3>get<wbr>Vertices</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#getvertices">getVertices</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L150">GenericGraphAdapter.ts:150</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L150">GenericGraphAdapter.ts:150</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Iterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">></span></h4> @@ -1733,7 +1741,7 @@ <h3>has<wbr>Edge</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#hasedge">hasEdge</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L232">GenericGraphAdapter.ts:232</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L232">GenericGraphAdapter.ts:232</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1760,7 +1768,7 @@ <h3>has<wbr>Vertex</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#hasvertex">hasVertex</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L237">GenericGraphAdapter.ts:237</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L237">GenericGraphAdapter.ts:237</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1784,7 +1792,7 @@ <h3>is<wbr>Reachable</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#isreachable">isReachable</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L130">GenericGraphAdapter.ts:130</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L130">GenericGraphAdapter.ts:130</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1811,7 +1819,7 @@ <h3>map</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/clonableadapter.html">ClonableAdapter</a>.<a href="../interfaces/clonableadapter.html#map">map</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L84">GenericGraphAdapter.ts:84</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L84">GenericGraphAdapter.ts:84</a></li> </ul> </aside> <h4 class="tsd-type-parameters-title">Type parameters</h4> @@ -1846,7 +1854,7 @@ <h3>set<wbr>Edge<wbr>Data</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L194">GenericGraphAdapter.ts:194</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L194">GenericGraphAdapter.ts:194</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1876,7 +1884,7 @@ <h3>supports<wbr>Order</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#supportsorder">supportsOrder</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L220">GenericGraphAdapter.ts:220</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L220">GenericGraphAdapter.ts:220</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> @@ -1893,7 +1901,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> create</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GenericGraphAdapter.ts#L55">GenericGraphAdapter.ts:55</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GenericGraphAdapter.ts#L55">GenericGraphAdapter.ts:55</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> diff --git a/docs/classes/graphlibadapter.html b/docs/classes/graphlibadapter.html index 7f2486b..810beb2 100644 --- a/docs/classes/graphlibadapter.html +++ b/docs/classes/graphlibadapter.html @@ -1050,6 +1050,9 @@ <li class=" tsd-kind-type-alias"> <a href="../globals.html#graphlibconstructor" class="tsd-kind-icon">Graphlib<wbr>Constructor</a> </li> + <li class=" tsd-kind-type-alias tsd-has-type-parameter"> + <a href="../globals.html#labelgenerator" class="tsd-kind-icon">Label<wbr>Generator</a> + </li> <li class=" tsd-kind-type-alias tsd-has-type-parameter"> <a href="../globals.html#multigraphedgedata" class="tsd-kind-icon">Multi<wbr>Graph<wbr>Edge<wbr>Data</a> </li> @@ -1062,6 +1065,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#cancontractedge" class="tsd-kind-icon">can<wbr>Contract<wbr>Edge</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#combineiterators" class="tsd-kind-icon">combine<wbr>Iterators</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#contractedge" class="tsd-kind-icon">contract<wbr>Edge</a> </li> @@ -1083,6 +1089,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#createmappediterator" class="tsd-kind-icon">create<wbr>Mapped<wbr>Iterator</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#foreach" class="tsd-kind-icon">for<wbr>Each</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#takefirst" class="tsd-kind-icon">take<wbr>First</a> </li> @@ -1192,7 +1201,7 @@ <h3>graph</h3> <div class="tsd-signature tsd-kind-icon">graph<span class="tsd-signature-symbol">:</span> </div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L213">GraphlibAdapter.ts:213</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L213">GraphlibAdapter.ts:213</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1216,7 +1225,7 @@ <h3>add<wbr>Edge</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L237">GraphlibAdapter.ts:237</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L237">GraphlibAdapter.ts:237</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1245,7 +1254,7 @@ <h3>add<wbr>Vertex</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L266">GraphlibAdapter.ts:266</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L266">GraphlibAdapter.ts:266</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1268,7 +1277,7 @@ <h3>can<wbr>Add<wbr>Edge</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L217">GraphlibAdapter.ts:217</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L217">GraphlibAdapter.ts:217</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1294,7 +1303,7 @@ <h3>can<wbr>Contract<wbr>Edge</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L88">GraphlibAdapter.ts:88</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L88">GraphlibAdapter.ts:88</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1320,7 +1329,7 @@ <h3>clone</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L82">GraphlibAdapter.ts:82</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L82">GraphlibAdapter.ts:82</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1364,7 +1373,7 @@ <h3>contract<wbr>Edge</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L92">GraphlibAdapter.ts:92</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L92">GraphlibAdapter.ts:92</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1396,7 +1405,7 @@ <h3>create<wbr>Vertex</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L261">GraphlibAdapter.ts:261</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L261">GraphlibAdapter.ts:261</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1419,7 +1428,7 @@ <h3>delete<wbr>Edge</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L274">GraphlibAdapter.ts:274</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L274">GraphlibAdapter.ts:274</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1445,7 +1454,7 @@ <h3>delete<wbr>Vertex</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L282">GraphlibAdapter.ts:282</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L282">GraphlibAdapter.ts:282</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1469,7 +1478,7 @@ <h3>get<wbr>Edge<wbr>Count</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#getedgecount">getEdgeCount</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L128">GraphlibAdapter.ts:128</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L128">GraphlibAdapter.ts:128</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> @@ -1486,7 +1495,7 @@ <h3>get<wbr>Edge<wbr>Data</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L170">GraphlibAdapter.ts:170</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L170">GraphlibAdapter.ts:170</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1512,7 +1521,7 @@ <h3>get<wbr>Edge<wbr>Data<wbr>From</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L143">GraphlibAdapter.ts:143</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L143">GraphlibAdapter.ts:143</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1535,7 +1544,7 @@ <h3>get<wbr>Edge<wbr>Data<wbr>To</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L162">GraphlibAdapter.ts:162</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L162">GraphlibAdapter.ts:162</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1559,7 +1568,7 @@ <h3>get<wbr>Edges</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#getedges">getEdges</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L186">GraphlibAdapter.ts:186</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L186">GraphlibAdapter.ts:186</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Iterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Pair</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h4> @@ -1577,7 +1586,7 @@ <h3>get<wbr>Edges<wbr>With<wbr>Data</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#getedgeswithdata">getEdgesWithData</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L191">GraphlibAdapter.ts:191</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L191">GraphlibAdapter.ts:191</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Iterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Triple</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Maybe</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TEdgeData</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h4> @@ -1594,7 +1603,7 @@ <h3>get<wbr>Edges<wbr>With<wbr>Data<wbr>From</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L132">GraphlibAdapter.ts:132</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L132">GraphlibAdapter.ts:132</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1617,7 +1626,7 @@ <h3>get<wbr>Edges<wbr>With<wbr>Data<wbr>To</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L151">GraphlibAdapter.ts:151</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L151">GraphlibAdapter.ts:151</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1640,7 +1649,7 @@ <h3>get<wbr>Order</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L204">GraphlibAdapter.ts:204</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L204">GraphlibAdapter.ts:204</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1663,7 +1672,7 @@ <h3>get<wbr>Predecessors<wbr>Of</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L108">GraphlibAdapter.ts:108</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L108">GraphlibAdapter.ts:108</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1686,7 +1695,7 @@ <h3>get<wbr>Successors<wbr>Of</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L100">GraphlibAdapter.ts:100</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L100">GraphlibAdapter.ts:100</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1710,7 +1719,7 @@ <h3>get<wbr>Vertex<wbr>Count</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#getvertexcount">getVertexCount</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L124">GraphlibAdapter.ts:124</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L124">GraphlibAdapter.ts:124</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> @@ -1728,7 +1737,7 @@ <h3>get<wbr>Vertices</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#getvertices">getVertices</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L182">GraphlibAdapter.ts:182</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L182">GraphlibAdapter.ts:182</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Iterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">></span></h4> @@ -1745,7 +1754,7 @@ <h3>has<wbr>Edge</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L116">GraphlibAdapter.ts:116</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L116">GraphlibAdapter.ts:116</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1771,7 +1780,7 @@ <h3>has<wbr>Vertex</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L120">GraphlibAdapter.ts:120</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L120">GraphlibAdapter.ts:120</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1794,7 +1803,7 @@ <h3>is<wbr>Reachable</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L96">GraphlibAdapter.ts:96</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L96">GraphlibAdapter.ts:96</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1820,7 +1829,7 @@ <h3>map</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L41">GraphlibAdapter.ts:41</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L41">GraphlibAdapter.ts:41</a></li> </ul> </aside> <h4 class="tsd-type-parameters-title">Type parameters</h4> @@ -1855,7 +1864,7 @@ <h3>set<wbr>Edge<wbr>Data</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L174">GraphlibAdapter.ts:174</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L174">GraphlibAdapter.ts:174</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1885,7 +1894,7 @@ <h3>supports<wbr>Order</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#supportsorder">supportsOrder</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L200">GraphlibAdapter.ts:200</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L200">GraphlibAdapter.ts:200</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> @@ -1902,7 +1911,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> create</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/GraphlibAdapter.ts#L19">GraphlibAdapter.ts:19</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/GraphlibAdapter.ts#L19">GraphlibAdapter.ts:19</a></li> </ul> </aside> <h4 class="tsd-type-parameters-title">Type parameters</h4> diff --git a/docs/classes/multigraphadapter.html b/docs/classes/multigraphadapter.html index 6e85ae5..1497433 100644 --- a/docs/classes/multigraphadapter.html +++ b/docs/classes/multigraphadapter.html @@ -934,12 +934,18 @@ <li class=" tsd-kind-method tsd-parent-kind-class"> <a href="multigraphadapter.html#cancontractedge" class="tsd-kind-icon">can<wbr>Contract<wbr>Edge</a> </li> + <li class=" tsd-kind-method tsd-parent-kind-class"> + <a href="multigraphadapter.html#cancontractlabelededge" class="tsd-kind-icon">can<wbr>Contract<wbr>Labeled<wbr>Edge</a> + </li> <li class=" tsd-kind-method tsd-parent-kind-class"> <a href="multigraphadapter.html#clone" class="tsd-kind-icon">clone</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class"> <a href="multigraphadapter.html#contractedge" class="tsd-kind-icon">contract<wbr>Edge</a> </li> + <li class=" tsd-kind-method tsd-parent-kind-class"> + <a href="multigraphadapter.html#contractlabelededge" class="tsd-kind-icon">contract<wbr>Labeled<wbr>Edge</a> + </li> <li class=" tsd-kind-method tsd-parent-kind-class"> <a href="multigraphadapter.html#deleteedge" class="tsd-kind-icon">delete<wbr>Edge</a> </li> @@ -1071,6 +1077,9 @@ <li class=" tsd-kind-type-alias"> <a href="../globals.html#graphlibconstructor" class="tsd-kind-icon">Graphlib<wbr>Constructor</a> </li> + <li class=" tsd-kind-type-alias tsd-has-type-parameter"> + <a href="../globals.html#labelgenerator" class="tsd-kind-icon">Label<wbr>Generator</a> + </li> <li class=" tsd-kind-type-alias tsd-has-type-parameter"> <a href="../globals.html#multigraphedgedata" class="tsd-kind-icon">Multi<wbr>Graph<wbr>Edge<wbr>Data</a> </li> @@ -1083,6 +1092,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#cancontractedge" class="tsd-kind-icon">can<wbr>Contract<wbr>Edge</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#combineiterators" class="tsd-kind-icon">combine<wbr>Iterators</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#contractedge" class="tsd-kind-icon">contract<wbr>Edge</a> </li> @@ -1104,6 +1116,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#createmappediterator" class="tsd-kind-icon">create<wbr>Mapped<wbr>Iterator</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#foreach" class="tsd-kind-icon">for<wbr>Each</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#takefirst" class="tsd-kind-icon">take<wbr>First</a> </li> @@ -1127,7 +1142,7 @@ supports multiple edges between two vertices. An edge is identified by its label. Labels are compared by a <code>Map</code>, ie. <code>===</code>.</p> </div> - <pre><code class="lang-typescript"> + <pre><code class="language-typescript"> // Type of the data we want to use as vertices. interface Vertex { id: number; @@ -1166,8 +1181,7 @@ graph.addEdge(v3, v1) // => false; graph.deleteEdge(v1, v2, "Label1"); -graph.addEdge(v3, v1) // true; -</code></pre> +graph.addEdge(v3, v1) // true;</code></pre> <dl class="tsd-comment-tags"> <dt>see</dt> <dd><p><a href="../interfaces/commonadapter.html">CommonAdapter</a></p> @@ -1234,8 +1248,10 @@ <h3>Methods</h3> <li class="tsd-kind-method tsd-parent-kind-class"><a href="multigraphadapter.html#addvertex" class="tsd-kind-icon">add<wbr>Vertex</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="multigraphadapter.html#canaddedge" class="tsd-kind-icon">can<wbr>Add<wbr>Edge</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="multigraphadapter.html#cancontractedge" class="tsd-kind-icon">can<wbr>Contract<wbr>Edge</a></li> + <li class="tsd-kind-method tsd-parent-kind-class"><a href="multigraphadapter.html#cancontractlabelededge" class="tsd-kind-icon">can<wbr>Contract<wbr>Labeled<wbr>Edge</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="multigraphadapter.html#clone" class="tsd-kind-icon">clone</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="multigraphadapter.html#contractedge" class="tsd-kind-icon">contract<wbr>Edge</a></li> + <li class="tsd-kind-method tsd-parent-kind-class"><a href="multigraphadapter.html#contractlabelededge" class="tsd-kind-icon">contract<wbr>Labeled<wbr>Edge</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="multigraphadapter.html#deleteedge" class="tsd-kind-icon">delete<wbr>Edge</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="multigraphadapter.html#deletelabelededge" class="tsd-kind-icon">delete<wbr>Labeled<wbr>Edge</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="multigraphadapter.html#deletevertex" class="tsd-kind-icon">delete<wbr>Vertex</a></li> @@ -1283,7 +1299,7 @@ <h3>add<wbr>Edge</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L176">MultiGraphAdapter.ts:176</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L173">MultiGraphAdapter.ts:173</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1320,13 +1336,12 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</ <h3>add<wbr>Labeled<wbr>Edge</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">add<wbr>Labeled<wbr>Edge<span class="tsd-signature-symbol">(</span>from<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TVertex</span>, to<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TVertex</span>, label<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Maybe</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TEdgeLabel</span><span class="tsd-signature-symbol">></span>, data<span class="tsd-signature-symbol">?: </span><a href="" class="tsd-signature-type">TEdgeData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> - <li class="tsd-signature tsd-kind-icon">add<wbr>Labeled<wbr>Edge<span class="tsd-signature-symbol">(</span>from<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TVertex</span>, to<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TVertex</span>, label<span class="tsd-signature-symbol">?: </span><a href="" class="tsd-signature-type">TEdgeLabel</a>, data<span class="tsd-signature-symbol">?: </span><a href="" class="tsd-signature-type">TEdgeData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L154">MultiGraphAdapter.ts:154</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L154">MultiGraphAdapter.ts:154</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1357,36 +1372,6 @@ <h5><span class="tsd-flag ts-flagOptional">Optional</span> data: <a href="" clas </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> </li> - <li class="tsd-description"> - <aside class="tsd-sources"> - <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L156">MultiGraphAdapter.ts:156</a></li> - </ul> - </aside> - <div class="tsd-comment tsd-typography"> - <dl class="tsd-comment-tags"> - <dt>deprecated</dt> - <dd><p>Specify a label, even if it is <code>undefined</code>. Otherwise, use <code>addEdge</code>.</p> - </dd> - </dl> - </div> - <h4 class="tsd-parameters-title">Parameters</h4> - <ul class="tsd-parameters"> - <li> - <h5>from: <span class="tsd-signature-type">TVertex</span></h5> - </li> - <li> - <h5>to: <span class="tsd-signature-type">TVertex</span></h5> - </li> - <li> - <h5><span class="tsd-flag ts-flagOptional">Optional</span> label: <a href="" class="tsd-signature-type">TEdgeLabel</a></h5> - </li> - <li> - <h5><span class="tsd-flag ts-flagOptional">Optional</span> data: <a href="" class="tsd-signature-type">TEdgeData</a></h5> - </li> - </ul> - <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> - </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> @@ -1400,7 +1385,7 @@ <h3>add<wbr>Vertex</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#addvertex">addVertex</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L195">MultiGraphAdapter.ts:195</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L192">MultiGraphAdapter.ts:192</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1423,7 +1408,7 @@ <h3>can<wbr>Add<wbr>Edge</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L161">MultiGraphAdapter.ts:161</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L158">MultiGraphAdapter.ts:158</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1453,7 +1438,7 @@ <h3>can<wbr>Contract<wbr>Edge</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#cancontractedge">canContractEdge</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L274">MultiGraphAdapter.ts:274</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L325">MultiGraphAdapter.ts:325</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1469,6 +1454,52 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</ </li> </ul> </section> + <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> + <a name="cancontractlabelededge" class="tsd-anchor"></a> + <h3>can<wbr>Contract<wbr>Labeled<wbr>Edge</h3> + <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> + <li class="tsd-signature tsd-kind-icon">can<wbr>Contract<wbr>Labeled<wbr>Edge<span class="tsd-signature-symbol">(</span>from<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TVertex</span>, to<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TVertex</span>, label<span class="tsd-signature-symbol">?: </span><a href="" class="tsd-signature-type">TEdgeLabel</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> + </ul> + <ul class="tsd-descriptions"> + <li class="tsd-description"> + <aside class="tsd-sources"> + <ul> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L318">MultiGraphAdapter.ts:318</a></li> + </ul> + </aside> + <div class="tsd-comment tsd-typography"> + <div class="lead"> + <p>This check if a specific labeled edge between the given vertices can be contracted. Note that cycles are not + allowed, so if there exists more than one edge between the given vertices, the contraction cannot be + performed as that would create a cycle.</p> + </div> + </div> + <h4 class="tsd-parameters-title">Parameters</h4> + <ul class="tsd-parameters"> + <li> + <h5>from: <span class="tsd-signature-type">TVertex</span></h5> + <div class="tsd-comment tsd-typography"> + <p>Source vertex of the edge.</p> + </div> + </li> + <li> + <h5>to: <span class="tsd-signature-type">TVertex</span></h5> + <div class="tsd-comment tsd-typography"> + <p>Target vertex of the edge.</p> + </div> + </li> + <li> + <h5><span class="tsd-flag ts-flagOptional">Optional</span> label: <a href="" class="tsd-signature-type">TEdgeLabel</a></h5> + <div class="tsd-comment tsd-typography"> + <p>Label of the edge to be deleted.</p> + </div> + </li> + </ul> + <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> + <p><code>true</code> iff the edge can be contracted, <code>false</code> otherwise.</p> + </li> + </ul> + </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> <a name="clone" class="tsd-anchor"></a> <h3>clone</h3> @@ -1479,7 +1510,7 @@ <h3>clone</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L142">MultiGraphAdapter.ts:142</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L142">MultiGraphAdapter.ts:142</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1509,31 +1540,98 @@ <h3>contract<wbr>Edge</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#contractedge">contractEdge</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L270">MultiGraphAdapter.ts:270</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L267">MultiGraphAdapter.ts:267</a></li> + </ul> + </aside> + <div class="tsd-comment tsd-typography"> + <div class="lead"> + <p>This contracts two vertices, ie. all edges between the given vertices.</p> + </div> + <dl class="tsd-comment-tags"> + <dt>see</dt> + <dd><p><a href="multigraphadapter.html">MultiGraphAdapter</a>#contractLabeledEdge</p> + </dd> + </dl> + </div> + <h4 class="tsd-parameters-title">Parameters</h4> + <ul class="tsd-parameters"> + <li> + <h5>from: <span class="tsd-signature-type">TVertex</span></h5> + </li> + <li> + <h5>to: <span class="tsd-signature-type">TVertex</span></h5> + </li> + <li> + <h5><span class="tsd-flag ts-flagOptional">Optional</span> vertexMerger: <span class="tsd-signature-type">BinaryOperator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">></span></h5> + </li> + <li> + <h5><span class="tsd-flag ts-flagOptional">Optional</span> edgeMerger: <span class="tsd-signature-type">BinaryOperator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TEdgeData</span><span class="tsd-signature-symbol">></span></h5> + </li> + </ul> + <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> + </li> + </ul> + </section> + <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> + <a name="contractlabelededge" class="tsd-anchor"></a> + <h3>contract<wbr>Labeled<wbr>Edge</h3> + <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> + <li class="tsd-signature tsd-kind-icon">contract<wbr>Labeled<wbr>Edge<span class="tsd-signature-symbol">(</span>from<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TVertex</span>, to<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TVertex</span>, label<span class="tsd-signature-symbol">?: </span><a href="" class="tsd-signature-type">TEdgeLabel</a>, vertexMerger<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">BinaryOperator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">></span>, edgeMerger<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">BinaryOperator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TEdgeData</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> + </ul> + <ul class="tsd-descriptions"> + <li class="tsd-description"> + <aside class="tsd-sources"> + <ul> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L299">MultiGraphAdapter.ts:299</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> - <p>This contracts two vertices, ie. all edges between the given vertices. - See <a href="../interfaces/commonadapter.html">CommonAdapter</a>#contractEdge.</p> + <p>This contract a specific labeled edge between the given vertices. Note that cycles are not allowed, so + if there exists more than one edge between the given vertices, the contraction cannot be performed as + that would create a cycle.</p> </div> + <dl class="tsd-comment-tags"> + <dt>throws</dt> + <dd><p>If vertex merger returns a vertex that is already contained in the graph.</p> + </dd> + <dt>see</dt> + <dd><p><a href="multigraphadapter.html">MultiGraphAdapter</a>#contractEdge</p> + </dd> + </dl> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>from: <span class="tsd-signature-type">TVertex</span></h5> + <div class="tsd-comment tsd-typography"> + <p>Source vertex of the edge.</p> + </div> </li> <li> <h5>to: <span class="tsd-signature-type">TVertex</span></h5> + <div class="tsd-comment tsd-typography"> + <p>Target vertex of the edge.</p> + </div> + </li> + <li> + <h5><span class="tsd-flag ts-flagOptional">Optional</span> label: <a href="" class="tsd-signature-type">TEdgeLabel</a></h5> + <div class="tsd-comment tsd-typography"> + <p>Label of the edge to be deleted.</p> + </div> </li> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> vertexMerger: <span class="tsd-signature-type">BinaryOperator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">></span></h5> + <div class="tsd-comment tsd-typography"> + <p>The vertex that replaces the two old vertices. If not given, defaults to <code>from</code>.</p> + </div> </li> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> edgeMerger: <span class="tsd-signature-type">BinaryOperator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TEdgeData</span><span class="tsd-signature-symbol">></span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> + <p><code>true</code> iff the edge was contracted.</p> </li> </ul> </section> @@ -1547,7 +1645,7 @@ <h3>delete<wbr>Edge</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L306">MultiGraphAdapter.ts:306</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L357">MultiGraphAdapter.ts:357</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1586,7 +1684,7 @@ <h3>delete<wbr>Labeled<wbr>Edge</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L285">MultiGraphAdapter.ts:285</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L336">MultiGraphAdapter.ts:336</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1631,16 +1729,25 @@ <h3>delete<wbr>Vertex</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#deletevertex">deleteVertex</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L314">MultiGraphAdapter.ts:314</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L370">MultiGraphAdapter.ts:370</a></li> </ul> </aside> + <div class="tsd-comment tsd-typography"> + <div class="lead"> + <p>Deletes a vertex from the graph; and all incident egdes.</p> + </div> + </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>vertex: <span class="tsd-signature-type">TVertex</span></h5> + <div class="tsd-comment tsd-typography"> + <p>Vertex to be deleted.</p> + </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> + <p>Whether the vertex was deleted. That is, it returns <code>false</code> in case the given vertex was not contained in this graph.</p> </li> </ul> </section> @@ -1655,7 +1762,7 @@ <h3>get<wbr>Edge<wbr>Count</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#getedgecount">getEdgeCount</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L332">MultiGraphAdapter.ts:332</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L396">MultiGraphAdapter.ts:396</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1681,7 +1788,7 @@ <h3>get<wbr>Edge<wbr>Count<wbr>Between</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L389">MultiGraphAdapter.ts:389</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L453">MultiGraphAdapter.ts:453</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1716,7 +1823,7 @@ <h3>get<wbr>Edge<wbr>Data</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L340">MultiGraphAdapter.ts:340</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L404">MultiGraphAdapter.ts:404</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1758,7 +1865,7 @@ <h3>get<wbr>Edge<wbr>Data<wbr>From</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L252">MultiGraphAdapter.ts:252</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L249">MultiGraphAdapter.ts:249</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1794,7 +1901,7 @@ <h3>get<wbr>Edge<wbr>Data<wbr>To</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L237">MultiGraphAdapter.ts:237</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L234">MultiGraphAdapter.ts:234</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1830,7 +1937,7 @@ <h3>get<wbr>Edge<wbr>Labels</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L397">MultiGraphAdapter.ts:397</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L461">MultiGraphAdapter.ts:461</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1857,7 +1964,7 @@ <h3>get<wbr>Edges</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#getedges">getEdges</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L361">MultiGraphAdapter.ts:361</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L425">MultiGraphAdapter.ts:425</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Iterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Pair</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h4> @@ -1875,7 +1982,7 @@ <h3>get<wbr>Edges<wbr>With<wbr>Data</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#getedgeswithdata">getEdgesWithData</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L365">MultiGraphAdapter.ts:365</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L429">MultiGraphAdapter.ts:429</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Iterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Triple</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Maybe</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TEdgeData</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h4> @@ -1892,7 +1999,7 @@ <h3>get<wbr>Edges<wbr>With<wbr>Data<wbr>From</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L220">MultiGraphAdapter.ts:220</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L217">MultiGraphAdapter.ts:217</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1928,7 +2035,7 @@ <h3>get<wbr>Edges<wbr>With<wbr>Data<wbr>To</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L203">MultiGraphAdapter.ts:203</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L200">MultiGraphAdapter.ts:200</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1964,7 +2071,7 @@ <h3>get<wbr>Labeled<wbr>Edge<wbr>Count</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L323">MultiGraphAdapter.ts:323</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L387">MultiGraphAdapter.ts:387</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1988,7 +2095,7 @@ <h3>get<wbr>Labeled<wbr>Edges</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L411">MultiGraphAdapter.ts:411</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L475">MultiGraphAdapter.ts:475</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -2013,7 +2120,7 @@ <h3>get<wbr>Labeled<wbr>Edges<wbr>With<wbr>Data</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L374">MultiGraphAdapter.ts:374</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L438">MultiGraphAdapter.ts:438</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Iterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Quadruple</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Maybe</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TEdgeData</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Maybe</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TEdgeLabel</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h4> @@ -2031,7 +2138,7 @@ <h3>get<wbr>Order</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#getorder">getOrder</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L452">MultiGraphAdapter.ts:452</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L516">MultiGraphAdapter.ts:516</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -2054,7 +2161,7 @@ <h3>get<wbr>Predecessors<wbr>Of</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L427">MultiGraphAdapter.ts:427</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L491">MultiGraphAdapter.ts:491</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -2091,7 +2198,7 @@ <h3>get<wbr>Successors<wbr>Of</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L442">MultiGraphAdapter.ts:442</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L506">MultiGraphAdapter.ts:506</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -2129,7 +2236,7 @@ <h3>get<wbr>Vertex<wbr>Count</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#getvertexcount">getVertexCount</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L460">MultiGraphAdapter.ts:460</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L524">MultiGraphAdapter.ts:524</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> @@ -2147,7 +2254,7 @@ <h3>get<wbr>Vertices</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#getvertices">getVertices</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L464">MultiGraphAdapter.ts:464</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L528">MultiGraphAdapter.ts:528</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Iterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">></span></h4> @@ -2164,7 +2271,7 @@ <h3>has<wbr>Edge</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L474">MultiGraphAdapter.ts:474</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L538">MultiGraphAdapter.ts:538</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -2205,7 +2312,7 @@ <h3>has<wbr>Labeled<wbr>Edge</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L488">MultiGraphAdapter.ts:488</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L552">MultiGraphAdapter.ts:552</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -2251,7 +2358,7 @@ <h3>has<wbr>Vertex</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#hasvertex">hasVertex</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L494">MultiGraphAdapter.ts:494</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L558">MultiGraphAdapter.ts:558</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -2275,7 +2382,7 @@ <h3>is<wbr>Reachable</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#isreachable">isReachable</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L498">MultiGraphAdapter.ts:498</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L562">MultiGraphAdapter.ts:562</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -2302,7 +2409,7 @@ <h3>map</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/clonableadapter.html">ClonableAdapter</a>.<a href="../interfaces/clonableadapter.html#map">map</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L138">MultiGraphAdapter.ts:138</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L138">MultiGraphAdapter.ts:138</a></li> </ul> </aside> <h4 class="tsd-type-parameters-title">Type parameters</h4> @@ -2337,7 +2444,7 @@ <h3>map<wbr>Labeled</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L124">MultiGraphAdapter.ts:124</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L124">MultiGraphAdapter.ts:124</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -2405,7 +2512,7 @@ <h3>set<wbr>Edge<wbr>Data</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L352">MultiGraphAdapter.ts:352</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L416">MultiGraphAdapter.ts:416</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -2448,7 +2555,7 @@ <h3>supports<wbr>Order</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/commonadapter.html">CommonAdapter</a>.<a href="../interfaces/commonadapter.html#supportsorder">supportsOrder</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L456">MultiGraphAdapter.ts:456</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L520">MultiGraphAdapter.ts:520</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> @@ -2465,7 +2572,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> create</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/MultiGraphAdapter.ts#L94">MultiGraphAdapter.ts:94</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/MultiGraphAdapter.ts#L94">MultiGraphAdapter.ts:94</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> diff --git a/docs/classes/pearcekellydetector.html b/docs/classes/pearcekellydetector.html index 195a6ea..69f287a 100644 --- a/docs/classes/pearcekellydetector.html +++ b/docs/classes/pearcekellydetector.html @@ -984,6 +984,9 @@ <li class=" tsd-kind-type-alias"> <a href="../globals.html#graphlibconstructor" class="tsd-kind-icon">Graphlib<wbr>Constructor</a> </li> + <li class=" tsd-kind-type-alias tsd-has-type-parameter"> + <a href="../globals.html#labelgenerator" class="tsd-kind-icon">Label<wbr>Generator</a> + </li> <li class=" tsd-kind-type-alias tsd-has-type-parameter"> <a href="../globals.html#multigraphedgedata" class="tsd-kind-icon">Multi<wbr>Graph<wbr>Edge<wbr>Data</a> </li> @@ -996,6 +999,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#cancontractedge" class="tsd-kind-icon">can<wbr>Contract<wbr>Edge</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#combineiterators" class="tsd-kind-icon">combine<wbr>Iterators</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#contractedge" class="tsd-kind-icon">contract<wbr>Edge</a> </li> @@ -1017,6 +1023,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#createmappediterator" class="tsd-kind-icon">create<wbr>Mapped<wbr>Iterator</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#foreach" class="tsd-kind-icon">for<wbr>Each</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#takefirst" class="tsd-kind-icon">take<wbr>First</a> </li> @@ -1039,13 +1048,12 @@ <p>Performs a cycle detection while edges are added. You must call the methods when edges are added etc. as described in @see <a href="../interfaces/cycledetector.html">CycleDetector</a>.</p> </div> - <pre><code class="lang-text">Based on the paper + <pre><code class="language-text">Based on the paper A Dynamic Topological Sort Algorithm for Directed Acyclic Graphs DAVID J. PEARCE / PAUL H. J. KELLY Journal of Experimental Algorithmics (JEA) Volume 11, 2006, Article No. 1.7 - ACM New York, NY, USA -</code></pre> + ACM New York, NY, USA</code></pre> <dl class="tsd-comment-tags"> <dt>see</dt> <dd><p><a href="../interfaces/cycledetector.html">CycleDetector</a></p> @@ -1112,7 +1120,7 @@ <h3>constructor</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/PearceKellyDetector.ts#L68">PearceKellyDetector.ts:68</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/PearceKellyDetector.ts#L68">PearceKellyDetector.ts:68</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <a href="pearcekellydetector.html" class="tsd-signature-type">PearceKellyDetector</a></h4> @@ -1133,7 +1141,7 @@ <h3>can<wbr>Add<wbr>Edge</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/cycledetector.html">CycleDetector</a>.<a href="../interfaces/cycledetector.html#canaddedge">canAddEdge</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/PearceKellyDetector.ts#L122">PearceKellyDetector.ts:122</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/PearceKellyDetector.ts#L122">PearceKellyDetector.ts:122</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1163,7 +1171,7 @@ <h3>create<wbr>Vertex<wbr>Data</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/cycledetector.html">CycleDetector</a>.<a href="../interfaces/cycledetector.html#createvertexdata">createVertexData</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/PearceKellyDetector.ts#L108">PearceKellyDetector.ts:108</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/PearceKellyDetector.ts#L108">PearceKellyDetector.ts:108</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1187,7 +1195,7 @@ <h3>get<wbr>Order</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/cycledetector.html">CycleDetector</a>.<a href="../interfaces/cycledetector.html#getorder">getOrder</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/PearceKellyDetector.ts#L134">PearceKellyDetector.ts:134</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/PearceKellyDetector.ts#L134">PearceKellyDetector.ts:134</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1214,7 +1222,7 @@ <h3>is<wbr>Reachable</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/cycledetector.html">CycleDetector</a>.<a href="../interfaces/cycledetector.html#isreachable">isReachable</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/PearceKellyDetector.ts#L89">PearceKellyDetector.ts:89</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/PearceKellyDetector.ts#L89">PearceKellyDetector.ts:89</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1244,7 +1252,7 @@ <h3>map</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/cycledetector.html">CycleDetector</a>.<a href="../interfaces/cycledetector.html#map">map</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/PearceKellyDetector.ts#L78">PearceKellyDetector.ts:78</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/PearceKellyDetector.ts#L78">PearceKellyDetector.ts:78</a></li> </ul> </aside> <h4 class="tsd-type-parameters-title">Type parameters</h4> @@ -1268,7 +1276,7 @@ <h3>on<wbr>Vertex<wbr>Deletion</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/cycledetector.html">CycleDetector</a>.<a href="../interfaces/cycledetector.html#onvertexdeletion">onVertexDeletion</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/PearceKellyDetector.ts#L116">PearceKellyDetector.ts:116</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/PearceKellyDetector.ts#L116">PearceKellyDetector.ts:116</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> @@ -1295,7 +1303,7 @@ <h3>supports<wbr>Order</h3> <aside class="tsd-sources"> <p>Implementation of <a href="../interfaces/cycledetector.html">CycleDetector</a>.<a href="../interfaces/cycledetector.html#supportsorder">supportsOrder</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/PearceKellyDetector.ts#L130">PearceKellyDetector.ts:130</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/PearceKellyDetector.ts#L130">PearceKellyDetector.ts:130</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> diff --git a/docs/globals.html b/docs/globals.html index 4a31984..7ede912 100644 --- a/docs/globals.html +++ b/docs/globals.html @@ -958,6 +958,9 @@ <li class=" tsd-kind-type-alias"> <a href="globals.html#graphlibconstructor" class="tsd-kind-icon">Graphlib<wbr>Constructor</a> </li> + <li class=" tsd-kind-type-alias tsd-has-type-parameter"> + <a href="globals.html#labelgenerator" class="tsd-kind-icon">Label<wbr>Generator</a> + </li> <li class=" tsd-kind-type-alias tsd-has-type-parameter"> <a href="globals.html#multigraphedgedata" class="tsd-kind-icon">Multi<wbr>Graph<wbr>Edge<wbr>Data</a> </li> @@ -970,6 +973,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="globals.html#cancontractedge" class="tsd-kind-icon">can<wbr>Contract<wbr>Edge</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="globals.html#combineiterators" class="tsd-kind-icon">combine<wbr>Iterators</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="globals.html#contractedge" class="tsd-kind-icon">contract<wbr>Edge</a> </li> @@ -991,6 +997,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="globals.html#createmappediterator" class="tsd-kind-icon">create<wbr>Mapped<wbr>Iterator</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="globals.html#foreach" class="tsd-kind-icon">for<wbr>Each</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="globals.html#takefirst" class="tsd-kind-icon">take<wbr>First</a> </li> @@ -1009,30 +1018,27 @@ <div class="content-wrap"> <div class="tsd-panel tsd-typography"> <p>Lets you add edges to a <a href="https://en.wikipedia.org/wiki/Directed_acyclic_graph">directed acyclic graph</a> and be told whether this edge - introduces a <a href="https://en.wikipedia.org/wiki/Cycle_(graph_theory">cycle</a>). If it would, it is not added. Useful when trying to build + introduces a <a href="https://en.wikipedia.org/wiki/Cycle_(graph_theory)">cycle</a>. If it would, it is not added. Useful when trying to build an acyclic graph.</p> <p>Based on <a href="https://dl.acm.org/citation.cfm?id=1210590">the paper</a>:</p> - <pre><code class="lang-text">A Dynamic Topological Sort Algorithm for Directed Acyclic Graphs + <pre><code class="language-text">A Dynamic Topological Sort Algorithm for Directed Acyclic Graphs DAVID J. PEARCE / PAUL H. J. KELLY Journal of Experimental Algorithmics (JEA) Volume 11, 2006, Article No. 1.7 - ACM New York, NY, USA -</code></pre> + ACM New York, NY, USA</code></pre> <h1 id="documentation">Documentation</h1> <p><a href="https://blutorange.github.io/js-incremental-cycle-detect/">See here for documentation</a></p> <h1 id="install">Install</h1> <p>The <a href="https://docs.npmjs.com/getting-started/installing-npm-packages-locally">drill</a>:</p> - <pre><code class="lang-sh">npm install --save incremental-cycle-detect -</code></pre> + <pre><code class="language-sh">npm install --save incremental-cycle-detect</code></pre> <p>Typings for <a href="https://www.typescriptlang.org/">Typescript</a> are available (this is written in typescript).</p> <p>Use the <code>dist.js</code> or <code>dist.min.js</code> for <a href="http://browserify.org/">browser usage</a> if you must.</p> <p>Exposes a <a href="https://softwareengineering.stackexchange.com/questions/277279/why-are-globals-bad-in-javascript">global object</a> <code>window.IncrementalCycleDetect</code> with the same methods you can when importing this lib:</p> - <pre><code class="lang-javascript"><span class="hljs-keyword">import</span> * <span class="hljs-keyword">as</span> IncrementalCycleDetect <span class="hljs-keyword">from</span> <span class="hljs-string">"incremental-cycle-detect"</span>; -</code></pre> + <pre><code class="language-javascript"><span class="hljs-keyword">import</span> * <span class="hljs-keyword">as</span> IncrementalCycleDetect <span class="hljs-keyword">from</span> <span class="hljs-string">"incremental-cycle-detect"</span>;</code></pre> <h1 id="usage">Usage</h1> <p>The main purpose of this library is to add edges to a directed acyclic graph and be told when that makes the graph cyclic.</p> - <pre><code class="lang-javascript"><span class="hljs-keyword">const</span> { GenericGraphAdapter } = <span class="hljs-built_in">require</span>(<span class="hljs-string">"incremental-cycle-detect"</span>); + <pre><code class="language-javascript"><span class="hljs-keyword">const</span> { GenericGraphAdapter } = <span class="hljs-built_in">require</span>(<span class="hljs-string">"incremental-cycle-detect"</span>); <span class="hljs-keyword">const</span> graph = GenericGraphAdapter.create(); graph.addEdge(<span class="hljs-number">0</span>, <span class="hljs-number">1</span>) <span class="hljs-comment">// => true</span> graph.addEdge(<span class="hljs-number">1</span>, <span class="hljs-number">2</span>) <span class="hljs-comment">// => true</span> @@ -1041,8 +1047,7 @@ <h1 id="usage">Usage</h1> <span class="hljs-comment">// The edge (3,0) was not added.</span> graph.deleteEdge(<span class="hljs-number">2</span>, <span class="hljs-number">3</span>); -graph.addEdge(<span class="hljs-number">3</span>, <span class="hljs-number">0</span>) <span class="hljs-comment">// => true, no cycle because we deleted edge (2,3)</span> -</code></pre> +graph.addEdge(<span class="hljs-number">3</span>, <span class="hljs-number">0</span>) <span class="hljs-comment">// => true, no cycle because we deleted edge (2,3)</span></code></pre> <p>The main algorithm is implemented by <code>CycleDetectorImpl</code>. To allow for this lib to work with different graph data structures, its methods take a <code>GraphAdapter</code> object for accessing the graph. You must called it every time an edge is added or removed, see the <a href="https://blutorange.github.io/js-incremental-cycle-detect/interfaces/graphadapter.html">docs for GraphAdapter</a> for more details.</p> @@ -1054,10 +1059,9 @@ <h1 id="usage">Usage</h1> <li><a href="https://blutorange.github.io/js-incremental-cycle-detect/classes/graphlibadapter.html">GraphlibAdapter</a>: For the npm module <a href="https://www.npmjs.com/package/graphlib">graphlib</a>. Vertices are strings. Does not support multigraphs currently.</li> </ul> <p>Example for using the GraphlibAdapter:</p> - <pre><code class="lang-javascript"><span class="hljs-keyword">const</span> { Graph } = <span class="hljs-built_in">require</span>(<span class="hljs-string">"graphlib"</span>); + <pre><code class="language-javascript"><span class="hljs-keyword">const</span> { Graph } = <span class="hljs-built_in">require</span>(<span class="hljs-string">"graphlib"</span>); <span class="hljs-keyword">const</span> graph = GraphlibAdapter.create({<span class="hljs-attr">graphlib</span>: Graph}); -graph.addEdge(<span class="hljs-number">0</span>, <span class="hljs-number">1</span>) <span class="hljs-comment">// => true</span> -</code></pre> +graph.addEdge(<span class="hljs-number">0</span>, <span class="hljs-number">1</span>) <span class="hljs-comment">// => true</span></code></pre> <p>You can add vertices explicitly, but it is not required. They are added if they do not exist.</p> <p>See the documentation linked above for all methods available.</p> <h1 id="performance">Performance</h1> @@ -1082,9 +1086,8 @@ <h1 id="javascript-environment">JavaScript environment</h1> <li><a href="https://en.wikipedia.org/wiki/Polyfill_%28programming%29">polyfill</a> <a href="https://www.npmjs.com/package/core-js">Map</a></li> <li>pass an implementation of <code>Map</code> to the constructor of the graph adapter. This way you don't have to <a href="https://stackoverflow.com/questions/5741877/is-monkey-patching-really-that-bad">monkey patch</a>:</li> </ul> - <pre><code class="lang-javascript"><span class="hljs-keyword">import</span> * <span class="hljs-keyword">as</span> <span class="hljs-built_in">Map</span> <span class="hljs-keyword">from</span> <span class="hljs-string">"core-js/es6/map"</span>; -<span class="hljs-keyword">const</span> graph = GenericGraphAdapter.create({<span class="hljs-attr">mapConstructor</span>: <span class="hljs-built_in">Map</span>}): -</code></pre> + <pre><code class="language-javascript"><span class="hljs-keyword">import</span> * <span class="hljs-keyword">as</span> <span class="hljs-built_in">Map</span> <span class="hljs-keyword">from</span> <span class="hljs-string">"core-js/es6/map"</span>; +<span class="hljs-keyword">const</span> graph = GenericGraphAdapter.create({<span class="hljs-attr">mapConstructor</span>: <span class="hljs-built_in">Map</span>}):</code></pre> <h1 id="use-your-own-graph-data-structure">Use your own graph data structure</h1> <p>As mentioned above, You can also use the CycleDetector (implemented by <code>PearceKellyDetector</code>) directly and roll your own graph data structure. See the <a href="https://blutorange.github.io/js-incremental-cycle-detect/classes/pearcekellydetector.html">docs</a>.</p> @@ -1092,17 +1095,15 @@ <h1 id="use-your-own-graph-data-structure">Use your own graph data structure</h1 whether adding an edge is allowed. You can also use an existing <code>GraphAdapter</code> (see above) as the starting point.</p> <h1 id="build">Build</h1> <p>May not to work on <a href="https://xkcd.com/196/">Windows</a>.</p> - <pre><code class="lang-sh">git <span class="hljs-built_in">clone</span> https://github.com/blutorange/js-incremental-cycle-detect + <pre><code class="language-sh">git <span class="hljs-built_in">clone</span> https://github.com/blutorange/js-incremental-cycle-detect <span class="hljs-built_in">cd</span> js-incremental-cycle-detection npm install -npm run build -</code></pre> +npm run build</code></pre> <h1 id="test">Test</h1> - <pre><code class="lang-sh">git <span class="hljs-built_in">clone</span> https://github.com/blutorange/js-incremental-cycle-detect + <pre><code class="language-sh">git <span class="hljs-built_in">clone</span> https://github.com/blutorange/js-incremental-cycle-detect <span class="hljs-built_in">cd</span> js-incremental-cycle-detection npm install -npm run <span class="hljs-built_in">test</span> -</code></pre> +npm run <span class="hljs-built_in">test</span></code></pre> <h1 id="change-log">Change log</h1> <p>I use the following keywords:</p> <ul> @@ -1111,6 +1112,12 @@ <h1 id="change-log">Change log</h1> <li><code>Fixed</code> A bug or error that was fixed.</li> </ul> <p>From newest to oldest:</p> + <h1 id="0-4-0">0.4.0</h1> + <ul> + <li>Fixed bug with <code>MultiGraphAdapter</code>: <code>#getLabelledEdge()</code> updated incorrectly.</li> + <li>Added an additional method <code>#contractLabeledEdge</code>, While <code>#contractEdge</code> contract all edges (irrespective of their label) between two vertices, <code>#contractEdge</code> contracts just one particular edge with a specific label. Note that since cycle are forbidden, a certain labeled edge between two vertices can only be contracted if it is the only edge between those two vertices. <code>#contractLabeled</code> refuses two contract in such a case, while <code>#contractVertices</code> contract all edges. You can check with <code>#canContractEdge</code> and <code>#canContractLabeledEdge</code>.</li> + <li>Removed deprecated <code>MultiGraphAdapter#addLabeledEdge(from: TVertex, to: TVertex, label?: TEdgeLabel, data?: TEdgeData): boolean</code></li> + </ul> <h1 id="0-3-0">0.3.0</h1> <ul> <li>Added <code>Algorithm#findWeaklyConnectedComponents</code>.</li> @@ -1177,6 +1184,7 @@ <h3>Type aliases</h3> <ul class="tsd-index-list"> <li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="globals.html#graphfactory" class="tsd-kind-icon">Graph<wbr>Factory</a></li> <li class="tsd-kind-type-alias"><a href="globals.html#graphlibconstructor" class="tsd-kind-icon">Graphlib<wbr>Constructor</a></li> + <li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="globals.html#labelgenerator" class="tsd-kind-icon">Label<wbr>Generator</a></li> <li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="globals.html#multigraphedgedata" class="tsd-kind-icon">Multi<wbr>Graph<wbr>Edge<wbr>Data</a></li> </ul> </section> @@ -1186,11 +1194,12 @@ <h3>Variables</h3> <li class="tsd-kind-variable tsd-is-private"><a href="globals.html#dummydetector" class="tsd-kind-icon">Dummy<wbr>Detector</a></li> </ul> </section> - <section class="tsd-index-section tsd-is-private tsd-is-private-protected"> + <section class="tsd-index-section "> <h3>Functions</h3> <ul class="tsd-index-list"> <li class="tsd-kind-function tsd-has-type-parameter tsd-is-private"><a href="globals.html#assign" class="tsd-kind-icon">assign</a></li> <li class="tsd-kind-function tsd-has-type-parameter tsd-is-private"><a href="globals.html#cancontractedge" class="tsd-kind-icon">can<wbr>Contract<wbr>Edge</a></li> + <li class="tsd-kind-function tsd-has-type-parameter"><a href="globals.html#combineiterators" class="tsd-kind-icon">combine<wbr>Iterators</a></li> <li class="tsd-kind-function tsd-has-type-parameter tsd-is-private"><a href="globals.html#contractedge" class="tsd-kind-icon">contract<wbr>Edge</a></li> <li class="tsd-kind-function tsd-has-type-parameter tsd-is-private"><a href="globals.html#createarrayiterator" class="tsd-kind-icon">create<wbr>Array<wbr>Iterator</a></li> <li class="tsd-kind-function tsd-has-type-parameter tsd-is-private"><a href="globals.html#createchainediterator" class="tsd-kind-icon">create<wbr>Chained<wbr>Iterator</a></li> @@ -1198,6 +1207,7 @@ <h3>Functions</h3> <li class="tsd-kind-function tsd-has-type-parameter tsd-is-private"><a href="globals.html#createflatmappediterator" class="tsd-kind-icon">create<wbr>Flat<wbr>Mapped<wbr>Iterator</a></li> <li class="tsd-kind-function tsd-has-type-parameter tsd-is-private"><a href="globals.html#createmappedarrayiterator" class="tsd-kind-icon">create<wbr>Mapped<wbr>Array<wbr>Iterator</a></li> <li class="tsd-kind-function tsd-has-type-parameter tsd-is-private"><a href="globals.html#createmappediterator" class="tsd-kind-icon">create<wbr>Mapped<wbr>Iterator</a></li> + <li class="tsd-kind-function tsd-has-type-parameter"><a href="globals.html#foreach" class="tsd-kind-icon">for<wbr>Each</a></li> <li class="tsd-kind-function tsd-has-type-parameter tsd-is-private"><a href="globals.html#takefirst" class="tsd-kind-icon">take<wbr>First</a></li> <li class="tsd-kind-function tsd-has-type-parameter tsd-is-private"><a href="globals.html#toarray" class="tsd-kind-icon">to<wbr>Array</a></li> </ul> @@ -1220,7 +1230,7 @@ <h3>Graph<wbr>Factory</h3> <div class="tsd-signature tsd-kind-icon">Graph<wbr>Factory<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">function</span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L37">Header.ts:37</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L39">Header.ts:39</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1255,7 +1265,7 @@ <h3>Graphlib<wbr>Constructor</h3> <div class="tsd-signature tsd-kind-icon">Graphlib<wbr>Constructor<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L52">Header.ts:52</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L54">Header.ts:54</a></li> </ul> </aside> <div class="tsd-type-declaration"> @@ -1264,13 +1274,23 @@ <h4>Type declaration</h4> </ul> </div> </section> + <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-has-type-parameter"> + <a name="labelgenerator" class="tsd-anchor"></a> + <h3>Label<wbr>Generator</h3> + <div class="tsd-signature tsd-kind-icon">Label<wbr>Generator<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">TypedTriFunction</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">TEdgeData</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Maybe</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TEdgeLabel</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></div> + <aside class="tsd-sources"> + <ul> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L4">Header.ts:4</a></li> + </ul> + </aside> + </section> <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-has-type-parameter"> <a name="multigraphedgedata" class="tsd-anchor"></a> <h3>Multi<wbr>Graph<wbr>Edge<wbr>Data</h3> <div class="tsd-signature tsd-kind-icon">Multi<wbr>Graph<wbr>Edge<wbr>Data<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Maybe</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TEdgeLabel</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Maybe</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TEdgeData</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L34">Header.ts:34</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L36">Header.ts:36</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1290,7 +1310,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> <span class="tsd-flag t <div class="tsd-signature tsd-kind-icon">Dummy<wbr>Detector<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">(Anonymous class)</span><span class="tsd-signature-symbol"> = new class implements CycleDetector<any> {map<TAnotherClonedVertex>(): CycleDetector<TAnotherClonedVertex> {return DummyDetector;}createVertexData(g: GraphAdapter<any>): VertexData {return DummyVertexData;}canAddEdge(g: GraphAdapter<any>, from: any, to: any): boolean {return true;}isReachable(g: GraphAdapter<any>, source: any, target: any): boolean {return false;}onVertexDeletion(g: GraphAdapter<any>, vertex: any): void {/***/}supportsOrder(): boolean {return false;}// and target, merging both vertices results in a cycle.getOrder(g: GraphAdapter<any>, vertex: any): number {return -1;}}()</span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L357">util.ts:357</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L391">util.ts:391</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1301,7 +1321,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> <span class="tsd-flag t </div> </section> </section> - <section class="tsd-panel-group tsd-member-group tsd-is-private tsd-is-private-protected"> + <section class="tsd-panel-group tsd-member-group "> <h2>Functions</h2> <section class="tsd-panel tsd-member tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a name="assign" class="tsd-anchor"></a> @@ -1313,7 +1333,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> assign</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L45">util.ts:45</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L45">util.ts:45</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1357,7 +1377,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> can<wbr>Contract<wbr>Ed <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L209">util.ts:209</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L243">util.ts:243</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1391,6 +1411,35 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</ </li> </ul> </section> + <section class="tsd-panel tsd-member tsd-kind-function tsd-has-type-parameter"> + <a name="combineiterators" class="tsd-anchor"></a> + <h3>combine<wbr>Iterators</h3> + <ul class="tsd-signatures tsd-kind-function tsd-has-type-parameter"> + <li class="tsd-signature tsd-kind-icon">combine<wbr>Iterators<T><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span>iterators<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Iterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Iterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span></li> + </ul> + <ul class="tsd-descriptions"> + <li class="tsd-description"> + <aside class="tsd-sources"> + <ul> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L74">util.ts:74</a></li> + </ul> + </aside> + <h4 class="tsd-type-parameters-title">Type parameters</h4> + <ul class="tsd-type-parameters"> + <li> + <h4>T</h4> + </li> + </ul> + <h4 class="tsd-parameters-title">Parameters</h4> + <ul class="tsd-parameters"> + <li> + <h5><span class="tsd-flag ts-flagRest">Rest</span> <span class="tsd-signature-symbol">...</span>iterators: <span class="tsd-signature-type">Iterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span></h5> + </li> + </ul> + <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Iterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span></h4> + </li> + </ul> + </section> <section class="tsd-panel tsd-member tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a name="contractedge" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagPrivate">Private</span> contract<wbr>Edge</h3> @@ -1401,7 +1450,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> contract<wbr>Edge</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L233">util.ts:233</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L267">util.ts:267</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1451,7 +1500,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> create<wbr>Array<wbr>It <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L164">util.ts:164</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L198">util.ts:198</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1489,7 +1538,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> create<wbr>Chained<wbr> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L107">util.ts:107</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L141">util.ts:141</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1525,7 +1574,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> create<wbr>Filtered<wbr <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L89">util.ts:89</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L123">util.ts:123</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1551,7 +1600,7 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Iterator< <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L90">util.ts:90</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L124">util.ts:124</a></li> </ul> </aside> <h4 class="tsd-type-parameters-title">Type parameters</h4> @@ -1583,7 +1632,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> create<wbr>Flat<wbr>Map <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L137">util.ts:137</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L171">util.ts:171</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1634,7 +1683,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> create<wbr>Mapped<wbr>A <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L187">util.ts:187</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L221">util.ts:221</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1675,7 +1724,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> create<wbr>Mapped<wbr>I <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L70">util.ts:70</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L104">util.ts:104</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1706,6 +1755,38 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Iterator< </li> </ul> </section> + <section class="tsd-panel tsd-member tsd-kind-function tsd-has-type-parameter"> + <a name="foreach" class="tsd-anchor"></a> + <h3>for<wbr>Each</h3> + <ul class="tsd-signatures tsd-kind-function tsd-has-type-parameter"> + <li class="tsd-signature tsd-kind-icon">for<wbr>Each<T><span class="tsd-signature-symbol">(</span>callback<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Consumer</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span>, <span class="tsd-signature-symbol">...</span>iterators<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Iterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> + </ul> + <ul class="tsd-descriptions"> + <li class="tsd-description"> + <aside class="tsd-sources"> + <ul> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L66">util.ts:66</a></li> + </ul> + </aside> + <h4 class="tsd-type-parameters-title">Type parameters</h4> + <ul class="tsd-type-parameters"> + <li> + <h4>T</h4> + </li> + </ul> + <h4 class="tsd-parameters-title">Parameters</h4> + <ul class="tsd-parameters"> + <li> + <h5>callback: <span class="tsd-signature-type">Consumer</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span></h5> + </li> + <li> + <h5><span class="tsd-flag ts-flagRest">Rest</span> <span class="tsd-signature-symbol">...</span>iterators: <span class="tsd-signature-type">Iterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span></h5> + </li> + </ul> + <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> + </li> + </ul> + </section> <section class="tsd-panel tsd-member tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a name="takefirst" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagPrivate">Private</span> take<wbr>First</h3> @@ -1716,7 +1797,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> take<wbr>First</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L12">util.ts:12</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L12">util.ts:12</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1754,7 +1835,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> to<wbr>Array</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L58">util.ts:58</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L58">util.ts:58</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1788,7 +1869,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> <span class="tsd-flag t <div class="tsd-signature tsd-kind-icon">Done<wbr>Iterator<wbr>Result<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L20">util.ts:20</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L20">util.ts:20</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1803,7 +1884,7 @@ <h3>done</h3> <div class="tsd-signature tsd-kind-icon">done<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">true</span><span class="tsd-signature-symbol"> = true</span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L21">util.ts:21</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L21">util.ts:21</a></li> </ul> </aside> </section> @@ -1813,7 +1894,7 @@ <h3>value</h3> <div class="tsd-signature tsd-kind-icon">value<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> = undefined</span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L22">util.ts:22</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L22">util.ts:22</a></li> </ul> </aside> </section> @@ -1824,7 +1905,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> <span class="tsd-flag t <div class="tsd-signature tsd-kind-icon">Empty<wbr>Iterator<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L29">util.ts:29</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L29">util.ts:29</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1843,7 +1924,7 @@ <h3>next</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L30">util.ts:30</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L30">util.ts:30</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">IteratorResult</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4> diff --git a/docs/index.html b/docs/index.html index 48c0370..60f57ca 100644 --- a/docs/index.html +++ b/docs/index.html @@ -958,6 +958,9 @@ <li class=" tsd-kind-type-alias"> <a href="globals.html#graphlibconstructor" class="tsd-kind-icon">Graphlib<wbr>Constructor</a> </li> + <li class=" tsd-kind-type-alias tsd-has-type-parameter"> + <a href="globals.html#labelgenerator" class="tsd-kind-icon">Label<wbr>Generator</a> + </li> <li class=" tsd-kind-type-alias tsd-has-type-parameter"> <a href="globals.html#multigraphedgedata" class="tsd-kind-icon">Multi<wbr>Graph<wbr>Edge<wbr>Data</a> </li> @@ -970,6 +973,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="globals.html#cancontractedge" class="tsd-kind-icon">can<wbr>Contract<wbr>Edge</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="globals.html#combineiterators" class="tsd-kind-icon">combine<wbr>Iterators</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="globals.html#contractedge" class="tsd-kind-icon">contract<wbr>Edge</a> </li> @@ -991,6 +997,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="globals.html#createmappediterator" class="tsd-kind-icon">create<wbr>Mapped<wbr>Iterator</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="globals.html#foreach" class="tsd-kind-icon">for<wbr>Each</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="globals.html#takefirst" class="tsd-kind-icon">take<wbr>First</a> </li> @@ -1009,30 +1018,27 @@ <div class="content-wrap"> <div class="tsd-panel tsd-typography"> <p>Lets you add edges to a <a href="https://en.wikipedia.org/wiki/Directed_acyclic_graph">directed acyclic graph</a> and be told whether this edge - introduces a <a href="https://en.wikipedia.org/wiki/Cycle_(graph_theory">cycle</a>). If it would, it is not added. Useful when trying to build + introduces a <a href="https://en.wikipedia.org/wiki/Cycle_(graph_theory)">cycle</a>. If it would, it is not added. Useful when trying to build an acyclic graph.</p> <p>Based on <a href="https://dl.acm.org/citation.cfm?id=1210590">the paper</a>:</p> - <pre><code class="lang-text">A Dynamic Topological Sort Algorithm for Directed Acyclic Graphs + <pre><code class="language-text">A Dynamic Topological Sort Algorithm for Directed Acyclic Graphs DAVID J. PEARCE / PAUL H. J. KELLY Journal of Experimental Algorithmics (JEA) Volume 11, 2006, Article No. 1.7 - ACM New York, NY, USA -</code></pre> + ACM New York, NY, USA</code></pre> <h1 id="documentation">Documentation</h1> <p><a href="https://blutorange.github.io/js-incremental-cycle-detect/">See here for documentation</a></p> <h1 id="install">Install</h1> <p>The <a href="https://docs.npmjs.com/getting-started/installing-npm-packages-locally">drill</a>:</p> - <pre><code class="lang-sh">npm install --save incremental-cycle-detect -</code></pre> + <pre><code class="language-sh">npm install --save incremental-cycle-detect</code></pre> <p>Typings for <a href="https://www.typescriptlang.org/">Typescript</a> are available (this is written in typescript).</p> <p>Use the <code>dist.js</code> or <code>dist.min.js</code> for <a href="http://browserify.org/">browser usage</a> if you must.</p> <p>Exposes a <a href="https://softwareengineering.stackexchange.com/questions/277279/why-are-globals-bad-in-javascript">global object</a> <code>window.IncrementalCycleDetect</code> with the same methods you can when importing this lib:</p> - <pre><code class="lang-javascript"><span class="hljs-keyword">import</span> * <span class="hljs-keyword">as</span> IncrementalCycleDetect <span class="hljs-keyword">from</span> <span class="hljs-string">"incremental-cycle-detect"</span>; -</code></pre> + <pre><code class="language-javascript"><span class="hljs-keyword">import</span> * <span class="hljs-keyword">as</span> IncrementalCycleDetect <span class="hljs-keyword">from</span> <span class="hljs-string">"incremental-cycle-detect"</span>;</code></pre> <h1 id="usage">Usage</h1> <p>The main purpose of this library is to add edges to a directed acyclic graph and be told when that makes the graph cyclic.</p> - <pre><code class="lang-javascript"><span class="hljs-keyword">const</span> { GenericGraphAdapter } = <span class="hljs-built_in">require</span>(<span class="hljs-string">"incremental-cycle-detect"</span>); + <pre><code class="language-javascript"><span class="hljs-keyword">const</span> { GenericGraphAdapter } = <span class="hljs-built_in">require</span>(<span class="hljs-string">"incremental-cycle-detect"</span>); <span class="hljs-keyword">const</span> graph = GenericGraphAdapter.create(); graph.addEdge(<span class="hljs-number">0</span>, <span class="hljs-number">1</span>) <span class="hljs-comment">// => true</span> graph.addEdge(<span class="hljs-number">1</span>, <span class="hljs-number">2</span>) <span class="hljs-comment">// => true</span> @@ -1041,8 +1047,7 @@ <h1 id="usage">Usage</h1> <span class="hljs-comment">// The edge (3,0) was not added.</span> graph.deleteEdge(<span class="hljs-number">2</span>, <span class="hljs-number">3</span>); -graph.addEdge(<span class="hljs-number">3</span>, <span class="hljs-number">0</span>) <span class="hljs-comment">// => true, no cycle because we deleted edge (2,3)</span> -</code></pre> +graph.addEdge(<span class="hljs-number">3</span>, <span class="hljs-number">0</span>) <span class="hljs-comment">// => true, no cycle because we deleted edge (2,3)</span></code></pre> <p>The main algorithm is implemented by <code>CycleDetectorImpl</code>. To allow for this lib to work with different graph data structures, its methods take a <code>GraphAdapter</code> object for accessing the graph. You must called it every time an edge is added or removed, see the <a href="https://blutorange.github.io/js-incremental-cycle-detect/interfaces/graphadapter.html">docs for GraphAdapter</a> for more details.</p> @@ -1054,10 +1059,9 @@ <h1 id="usage">Usage</h1> <li><a href="https://blutorange.github.io/js-incremental-cycle-detect/classes/graphlibadapter.html">GraphlibAdapter</a>: For the npm module <a href="https://www.npmjs.com/package/graphlib">graphlib</a>. Vertices are strings. Does not support multigraphs currently.</li> </ul> <p>Example for using the GraphlibAdapter:</p> - <pre><code class="lang-javascript"><span class="hljs-keyword">const</span> { Graph } = <span class="hljs-built_in">require</span>(<span class="hljs-string">"graphlib"</span>); + <pre><code class="language-javascript"><span class="hljs-keyword">const</span> { Graph } = <span class="hljs-built_in">require</span>(<span class="hljs-string">"graphlib"</span>); <span class="hljs-keyword">const</span> graph = GraphlibAdapter.create({<span class="hljs-attr">graphlib</span>: Graph}); -graph.addEdge(<span class="hljs-number">0</span>, <span class="hljs-number">1</span>) <span class="hljs-comment">// => true</span> -</code></pre> +graph.addEdge(<span class="hljs-number">0</span>, <span class="hljs-number">1</span>) <span class="hljs-comment">// => true</span></code></pre> <p>You can add vertices explicitly, but it is not required. They are added if they do not exist.</p> <p>See the documentation linked above for all methods available.</p> <h1 id="performance">Performance</h1> @@ -1082,9 +1086,8 @@ <h1 id="javascript-environment">JavaScript environment</h1> <li><a href="https://en.wikipedia.org/wiki/Polyfill_%28programming%29">polyfill</a> <a href="https://www.npmjs.com/package/core-js">Map</a></li> <li>pass an implementation of <code>Map</code> to the constructor of the graph adapter. This way you don't have to <a href="https://stackoverflow.com/questions/5741877/is-monkey-patching-really-that-bad">monkey patch</a>:</li> </ul> - <pre><code class="lang-javascript"><span class="hljs-keyword">import</span> * <span class="hljs-keyword">as</span> <span class="hljs-built_in">Map</span> <span class="hljs-keyword">from</span> <span class="hljs-string">"core-js/es6/map"</span>; -<span class="hljs-keyword">const</span> graph = GenericGraphAdapter.create({<span class="hljs-attr">mapConstructor</span>: <span class="hljs-built_in">Map</span>}): -</code></pre> + <pre><code class="language-javascript"><span class="hljs-keyword">import</span> * <span class="hljs-keyword">as</span> <span class="hljs-built_in">Map</span> <span class="hljs-keyword">from</span> <span class="hljs-string">"core-js/es6/map"</span>; +<span class="hljs-keyword">const</span> graph = GenericGraphAdapter.create({<span class="hljs-attr">mapConstructor</span>: <span class="hljs-built_in">Map</span>}):</code></pre> <h1 id="use-your-own-graph-data-structure">Use your own graph data structure</h1> <p>As mentioned above, You can also use the CycleDetector (implemented by <code>PearceKellyDetector</code>) directly and roll your own graph data structure. See the <a href="https://blutorange.github.io/js-incremental-cycle-detect/classes/pearcekellydetector.html">docs</a>.</p> @@ -1092,17 +1095,15 @@ <h1 id="use-your-own-graph-data-structure">Use your own graph data structure</h1 whether adding an edge is allowed. You can also use an existing <code>GraphAdapter</code> (see above) as the starting point.</p> <h1 id="build">Build</h1> <p>May not to work on <a href="https://xkcd.com/196/">Windows</a>.</p> - <pre><code class="lang-sh">git <span class="hljs-built_in">clone</span> https://github.com/blutorange/js-incremental-cycle-detect + <pre><code class="language-sh">git <span class="hljs-built_in">clone</span> https://github.com/blutorange/js-incremental-cycle-detect <span class="hljs-built_in">cd</span> js-incremental-cycle-detection npm install -npm run build -</code></pre> +npm run build</code></pre> <h1 id="test">Test</h1> - <pre><code class="lang-sh">git <span class="hljs-built_in">clone</span> https://github.com/blutorange/js-incremental-cycle-detect + <pre><code class="language-sh">git <span class="hljs-built_in">clone</span> https://github.com/blutorange/js-incremental-cycle-detect <span class="hljs-built_in">cd</span> js-incremental-cycle-detection npm install -npm run <span class="hljs-built_in">test</span> -</code></pre> +npm run <span class="hljs-built_in">test</span></code></pre> <h1 id="change-log">Change log</h1> <p>I use the following keywords:</p> <ul> @@ -1111,6 +1112,12 @@ <h1 id="change-log">Change log</h1> <li><code>Fixed</code> A bug or error that was fixed.</li> </ul> <p>From newest to oldest:</p> + <h1 id="0-4-0">0.4.0</h1> + <ul> + <li>Fixed bug with <code>MultiGraphAdapter</code>: <code>#getLabelledEdge()</code> updated incorrectly.</li> + <li>Added an additional method <code>#contractLabeledEdge</code>, While <code>#contractEdge</code> contract all edges (irrespective of their label) between two vertices, <code>#contractEdge</code> contracts just one particular edge with a specific label. Note that since cycle are forbidden, a certain labeled edge between two vertices can only be contracted if it is the only edge between those two vertices. <code>#contractLabeled</code> refuses two contract in such a case, while <code>#contractVertices</code> contract all edges. You can check with <code>#canContractEdge</code> and <code>#canContractLabeledEdge</code>.</li> + <li>Removed deprecated <code>MultiGraphAdapter#addLabeledEdge(from: TVertex, to: TVertex, label?: TEdgeLabel, data?: TEdgeData): boolean</code></li> + </ul> <h1 id="0-3-0">0.3.0</h1> <ul> <li>Added <code>Algorithm#findWeaklyConnectedComponents</code>.</li> @@ -1178,6 +1185,7 @@ <h3>Type aliases</h3> <ul class="tsd-index-list"> <li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="globals.html#graphfactory" class="tsd-kind-icon">Graph<wbr>Factory</a></li> <li class="tsd-kind-type-alias"><a href="globals.html#graphlibconstructor" class="tsd-kind-icon">Graphlib<wbr>Constructor</a></li> + <li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="globals.html#labelgenerator" class="tsd-kind-icon">Label<wbr>Generator</a></li> <li class="tsd-kind-type-alias tsd-has-type-parameter"><a href="globals.html#multigraphedgedata" class="tsd-kind-icon">Multi<wbr>Graph<wbr>Edge<wbr>Data</a></li> </ul> </section> @@ -1187,11 +1195,12 @@ <h3>Variables</h3> <li class="tsd-kind-variable tsd-is-private"><a href="globals.html#dummydetector" class="tsd-kind-icon">Dummy<wbr>Detector</a></li> </ul> </section> - <section class="tsd-index-section tsd-is-private tsd-is-private-protected"> + <section class="tsd-index-section "> <h3>Functions</h3> <ul class="tsd-index-list"> <li class="tsd-kind-function tsd-has-type-parameter tsd-is-private"><a href="globals.html#assign" class="tsd-kind-icon">assign</a></li> <li class="tsd-kind-function tsd-has-type-parameter tsd-is-private"><a href="globals.html#cancontractedge" class="tsd-kind-icon">can<wbr>Contract<wbr>Edge</a></li> + <li class="tsd-kind-function tsd-has-type-parameter"><a href="globals.html#combineiterators" class="tsd-kind-icon">combine<wbr>Iterators</a></li> <li class="tsd-kind-function tsd-has-type-parameter tsd-is-private"><a href="globals.html#contractedge" class="tsd-kind-icon">contract<wbr>Edge</a></li> <li class="tsd-kind-function tsd-has-type-parameter tsd-is-private"><a href="globals.html#createarrayiterator" class="tsd-kind-icon">create<wbr>Array<wbr>Iterator</a></li> <li class="tsd-kind-function tsd-has-type-parameter tsd-is-private"><a href="globals.html#createchainediterator" class="tsd-kind-icon">create<wbr>Chained<wbr>Iterator</a></li> @@ -1199,6 +1208,7 @@ <h3>Functions</h3> <li class="tsd-kind-function tsd-has-type-parameter tsd-is-private"><a href="globals.html#createflatmappediterator" class="tsd-kind-icon">create<wbr>Flat<wbr>Mapped<wbr>Iterator</a></li> <li class="tsd-kind-function tsd-has-type-parameter tsd-is-private"><a href="globals.html#createmappedarrayiterator" class="tsd-kind-icon">create<wbr>Mapped<wbr>Array<wbr>Iterator</a></li> <li class="tsd-kind-function tsd-has-type-parameter tsd-is-private"><a href="globals.html#createmappediterator" class="tsd-kind-icon">create<wbr>Mapped<wbr>Iterator</a></li> + <li class="tsd-kind-function tsd-has-type-parameter"><a href="globals.html#foreach" class="tsd-kind-icon">for<wbr>Each</a></li> <li class="tsd-kind-function tsd-has-type-parameter tsd-is-private"><a href="globals.html#takefirst" class="tsd-kind-icon">take<wbr>First</a></li> <li class="tsd-kind-function tsd-has-type-parameter tsd-is-private"><a href="globals.html#toarray" class="tsd-kind-icon">to<wbr>Array</a></li> </ul> @@ -1221,7 +1231,7 @@ <h3>Graph<wbr>Factory</h3> <div class="tsd-signature tsd-kind-icon">Graph<wbr>Factory<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">function</span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L37">Header.ts:37</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L39">Header.ts:39</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1256,7 +1266,7 @@ <h3>Graphlib<wbr>Constructor</h3> <div class="tsd-signature tsd-kind-icon">Graphlib<wbr>Constructor<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L52">Header.ts:52</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L54">Header.ts:54</a></li> </ul> </aside> <div class="tsd-type-declaration"> @@ -1265,13 +1275,23 @@ <h4>Type declaration</h4> </ul> </div> </section> + <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-has-type-parameter"> + <a name="labelgenerator" class="tsd-anchor"></a> + <h3>Label<wbr>Generator</h3> + <div class="tsd-signature tsd-kind-icon">Label<wbr>Generator<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">TypedTriFunction</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">TEdgeData</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Maybe</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TEdgeLabel</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></div> + <aside class="tsd-sources"> + <ul> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L4">Header.ts:4</a></li> + </ul> + </aside> + </section> <section class="tsd-panel tsd-member tsd-kind-type-alias tsd-has-type-parameter"> <a name="multigraphedgedata" class="tsd-anchor"></a> <h3>Multi<wbr>Graph<wbr>Edge<wbr>Data</h3> <div class="tsd-signature tsd-kind-icon">Multi<wbr>Graph<wbr>Edge<wbr>Data<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Maybe</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TEdgeLabel</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Maybe</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TEdgeData</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L34">Header.ts:34</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L36">Header.ts:36</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1291,7 +1311,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> <span class="tsd-flag t <div class="tsd-signature tsd-kind-icon">Dummy<wbr>Detector<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">(Anonymous class)</span><span class="tsd-signature-symbol"> = new class implements CycleDetector<any> {map<TAnotherClonedVertex>(): CycleDetector<TAnotherClonedVertex> {return DummyDetector;}createVertexData(g: GraphAdapter<any>): VertexData {return DummyVertexData;}canAddEdge(g: GraphAdapter<any>, from: any, to: any): boolean {return true;}isReachable(g: GraphAdapter<any>, source: any, target: any): boolean {return false;}onVertexDeletion(g: GraphAdapter<any>, vertex: any): void {/***/}supportsOrder(): boolean {return false;}// and target, merging both vertices results in a cycle.getOrder(g: GraphAdapter<any>, vertex: any): number {return -1;}}()</span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L357">util.ts:357</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L391">util.ts:391</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1302,7 +1322,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> <span class="tsd-flag t </div> </section> </section> - <section class="tsd-panel-group tsd-member-group tsd-is-private tsd-is-private-protected"> + <section class="tsd-panel-group tsd-member-group "> <h2>Functions</h2> <section class="tsd-panel tsd-member tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a name="assign" class="tsd-anchor"></a> @@ -1314,7 +1334,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> assign</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L45">util.ts:45</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L45">util.ts:45</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1358,7 +1378,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> can<wbr>Contract<wbr>Ed <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L209">util.ts:209</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L243">util.ts:243</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1392,6 +1412,35 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</ </li> </ul> </section> + <section class="tsd-panel tsd-member tsd-kind-function tsd-has-type-parameter"> + <a name="combineiterators" class="tsd-anchor"></a> + <h3>combine<wbr>Iterators</h3> + <ul class="tsd-signatures tsd-kind-function tsd-has-type-parameter"> + <li class="tsd-signature tsd-kind-icon">combine<wbr>Iterators<T><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span>iterators<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Iterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Iterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span></li> + </ul> + <ul class="tsd-descriptions"> + <li class="tsd-description"> + <aside class="tsd-sources"> + <ul> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L74">util.ts:74</a></li> + </ul> + </aside> + <h4 class="tsd-type-parameters-title">Type parameters</h4> + <ul class="tsd-type-parameters"> + <li> + <h4>T</h4> + </li> + </ul> + <h4 class="tsd-parameters-title">Parameters</h4> + <ul class="tsd-parameters"> + <li> + <h5><span class="tsd-flag ts-flagRest">Rest</span> <span class="tsd-signature-symbol">...</span>iterators: <span class="tsd-signature-type">Iterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span></h5> + </li> + </ul> + <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Iterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span></h4> + </li> + </ul> + </section> <section class="tsd-panel tsd-member tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a name="contractedge" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagPrivate">Private</span> contract<wbr>Edge</h3> @@ -1402,7 +1451,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> contract<wbr>Edge</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L233">util.ts:233</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L267">util.ts:267</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1452,7 +1501,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> create<wbr>Array<wbr>It <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L164">util.ts:164</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L198">util.ts:198</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1490,7 +1539,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> create<wbr>Chained<wbr> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L107">util.ts:107</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L141">util.ts:141</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1526,7 +1575,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> create<wbr>Filtered<wbr <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L89">util.ts:89</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L123">util.ts:123</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1552,7 +1601,7 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Iterator< <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L90">util.ts:90</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L124">util.ts:124</a></li> </ul> </aside> <h4 class="tsd-type-parameters-title">Type parameters</h4> @@ -1584,7 +1633,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> create<wbr>Flat<wbr>Map <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L137">util.ts:137</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L171">util.ts:171</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1635,7 +1684,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> create<wbr>Mapped<wbr>A <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L187">util.ts:187</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L221">util.ts:221</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1676,7 +1725,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> create<wbr>Mapped<wbr>I <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L70">util.ts:70</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L104">util.ts:104</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1707,6 +1756,38 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Iterator< </li> </ul> </section> + <section class="tsd-panel tsd-member tsd-kind-function tsd-has-type-parameter"> + <a name="foreach" class="tsd-anchor"></a> + <h3>for<wbr>Each</h3> + <ul class="tsd-signatures tsd-kind-function tsd-has-type-parameter"> + <li class="tsd-signature tsd-kind-icon">for<wbr>Each<T><span class="tsd-signature-symbol">(</span>callback<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Consumer</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span>, <span class="tsd-signature-symbol">...</span>iterators<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Iterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> + </ul> + <ul class="tsd-descriptions"> + <li class="tsd-description"> + <aside class="tsd-sources"> + <ul> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L66">util.ts:66</a></li> + </ul> + </aside> + <h4 class="tsd-type-parameters-title">Type parameters</h4> + <ul class="tsd-type-parameters"> + <li> + <h4>T</h4> + </li> + </ul> + <h4 class="tsd-parameters-title">Parameters</h4> + <ul class="tsd-parameters"> + <li> + <h5>callback: <span class="tsd-signature-type">Consumer</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span></h5> + </li> + <li> + <h5><span class="tsd-flag ts-flagRest">Rest</span> <span class="tsd-signature-symbol">...</span>iterators: <span class="tsd-signature-type">Iterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span></h5> + </li> + </ul> + <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> + </li> + </ul> + </section> <section class="tsd-panel tsd-member tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a name="takefirst" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagPrivate">Private</span> take<wbr>First</h3> @@ -1717,7 +1798,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> take<wbr>First</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L12">util.ts:12</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L12">util.ts:12</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1755,7 +1836,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> to<wbr>Array</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L58">util.ts:58</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L58">util.ts:58</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1789,7 +1870,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> <span class="tsd-flag t <div class="tsd-signature tsd-kind-icon">Done<wbr>Iterator<wbr>Result<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L20">util.ts:20</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L20">util.ts:20</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1804,7 +1885,7 @@ <h3>done</h3> <div class="tsd-signature tsd-kind-icon">done<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">true</span><span class="tsd-signature-symbol"> = true</span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L21">util.ts:21</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L21">util.ts:21</a></li> </ul> </aside> </section> @@ -1814,7 +1895,7 @@ <h3>value</h3> <div class="tsd-signature tsd-kind-icon">value<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> = undefined</span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L22">util.ts:22</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L22">util.ts:22</a></li> </ul> </aside> </section> @@ -1825,7 +1906,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> <span class="tsd-flag t <div class="tsd-signature tsd-kind-icon">Empty<wbr>Iterator<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L29">util.ts:29</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L29">util.ts:29</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1844,7 +1925,7 @@ <h3>next</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/util.ts#L30">util.ts:30</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/util.ts#L30">util.ts:30</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">IteratorResult</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4> diff --git a/docs/interfaces/clonableadapter.html b/docs/interfaces/clonableadapter.html index e8fdda9..5eda468 100644 --- a/docs/interfaces/clonableadapter.html +++ b/docs/interfaces/clonableadapter.html @@ -966,6 +966,9 @@ <li class=" tsd-kind-type-alias"> <a href="../globals.html#graphlibconstructor" class="tsd-kind-icon">Graphlib<wbr>Constructor</a> </li> + <li class=" tsd-kind-type-alias tsd-has-type-parameter"> + <a href="../globals.html#labelgenerator" class="tsd-kind-icon">Label<wbr>Generator</a> + </li> <li class=" tsd-kind-type-alias tsd-has-type-parameter"> <a href="../globals.html#multigraphedgedata" class="tsd-kind-icon">Multi<wbr>Graph<wbr>Edge<wbr>Data</a> </li> @@ -978,6 +981,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#cancontractedge" class="tsd-kind-icon">can<wbr>Contract<wbr>Edge</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#combineiterators" class="tsd-kind-icon">combine<wbr>Iterators</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#contractedge" class="tsd-kind-icon">contract<wbr>Edge</a> </li> @@ -999,6 +1005,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#createmappediterator" class="tsd-kind-icon">create<wbr>Mapped<wbr>Iterator</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#foreach" class="tsd-kind-icon">for<wbr>Each</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#takefirst" class="tsd-kind-icon">take<wbr>First</a> </li> @@ -1067,7 +1076,7 @@ <h3>clone</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L175">Header.ts:175</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L177">Header.ts:177</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1114,7 +1123,7 @@ <h3>map</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L193">Header.ts:193</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L195">Header.ts:195</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> diff --git a/docs/interfaces/commonadapter.html b/docs/interfaces/commonadapter.html index e7541f3..20ec62b 100644 --- a/docs/interfaces/commonadapter.html +++ b/docs/interfaces/commonadapter.html @@ -1035,6 +1035,9 @@ <li class=" tsd-kind-type-alias"> <a href="../globals.html#graphlibconstructor" class="tsd-kind-icon">Graphlib<wbr>Constructor</a> </li> + <li class=" tsd-kind-type-alias tsd-has-type-parameter"> + <a href="../globals.html#labelgenerator" class="tsd-kind-icon">Label<wbr>Generator</a> + </li> <li class=" tsd-kind-type-alias tsd-has-type-parameter"> <a href="../globals.html#multigraphedgedata" class="tsd-kind-icon">Multi<wbr>Graph<wbr>Edge<wbr>Data</a> </li> @@ -1047,6 +1050,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#cancontractedge" class="tsd-kind-icon">can<wbr>Contract<wbr>Edge</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#combineiterators" class="tsd-kind-icon">combine<wbr>Iterators</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#contractedge" class="tsd-kind-icon">contract<wbr>Edge</a> </li> @@ -1068,6 +1074,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#createmappediterator" class="tsd-kind-icon">create<wbr>Mapped<wbr>Iterator</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#foreach" class="tsd-kind-icon">for<wbr>Each</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#takefirst" class="tsd-kind-icon">take<wbr>First</a> </li> @@ -1167,7 +1176,7 @@ <h3>add<wbr>Edge</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L205">Header.ts:205</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L207">Header.ts:207</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1209,7 +1218,7 @@ <h3>add<wbr>Vertex</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L211">Header.ts:211</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L213">Header.ts:213</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1241,7 +1250,7 @@ <h3>can<wbr>Add<wbr>Edge</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L218">Header.ts:218</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L220">Header.ts:220</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1279,7 +1288,7 @@ <h3>can<wbr>Contract<wbr>Edge</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L225">Header.ts:225</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L227">Header.ts:227</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1317,7 +1326,7 @@ <h3>contract<wbr>Edge</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L239">Header.ts:239</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L241">Header.ts:241</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1376,7 +1385,7 @@ <h3>delete<wbr>Edge</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L246">Header.ts:246</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L248">Header.ts:248</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1414,7 +1423,7 @@ <h3>delete<wbr>Vertex</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L252">Header.ts:252</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L254">Header.ts:254</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1446,7 +1455,7 @@ <h3>get<wbr>Edge<wbr>Count</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L256">Header.ts:256</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L258">Header.ts:258</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1466,7 +1475,7 @@ <h3>get<wbr>Edge<wbr>Data</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L262">Header.ts:262</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L264">Header.ts:264</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1501,7 +1510,7 @@ <h3>get<wbr>Edge<wbr>Data<wbr>From</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L276">Header.ts:276</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L278">Header.ts:278</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1534,7 +1543,7 @@ <h3>get<wbr>Edge<wbr>Data<wbr>To</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L269">Header.ts:269</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L271">Header.ts:271</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1567,7 +1576,7 @@ <h3>get<wbr>Edges</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L294">Header.ts:294</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L296">Header.ts:296</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1587,7 +1596,7 @@ <h3>get<wbr>Edges<wbr>With<wbr>Data</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L298">Header.ts:298</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L300">Header.ts:300</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1607,7 +1616,7 @@ <h3>get<wbr>Edges<wbr>With<wbr>Data<wbr>From</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L290">Header.ts:290</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L292">Header.ts:292</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1640,7 +1649,7 @@ <h3>get<wbr>Edges<wbr>With<wbr>Data<wbr>To</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L283">Header.ts:283</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L285">Header.ts:285</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1673,7 +1682,7 @@ <h3>get<wbr>Order</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L305">Header.ts:305</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L307">Header.ts:307</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1705,7 +1714,7 @@ <h3>get<wbr>Predecessors<wbr>Of</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L310">Header.ts:310</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L312">Header.ts:312</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1734,7 +1743,7 @@ <h3>get<wbr>Successors<wbr>Of</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L315">Header.ts:315</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L317">Header.ts:317</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1763,7 +1772,7 @@ <h3>get<wbr>Vertex<wbr>Count</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L319">Header.ts:319</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L321">Header.ts:321</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1783,7 +1792,7 @@ <h3>get<wbr>Vertices</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L323">Header.ts:323</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L325">Header.ts:325</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1803,7 +1812,7 @@ <h3>has<wbr>Edge</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L329">Header.ts:329</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L331">Header.ts:331</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1838,7 +1847,7 @@ <h3>has<wbr>Vertex</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L334">Header.ts:334</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L336">Header.ts:336</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1864,7 +1873,7 @@ <h3>is<wbr>Reachable</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L341">Header.ts:341</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L343">Header.ts:343</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1902,7 +1911,7 @@ <h3>set<wbr>Edge<wbr>Data</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L348">Header.ts:348</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L350">Header.ts:350</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1943,7 +1952,7 @@ <h3>supports<wbr>Order</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L352">Header.ts:352</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L354">Header.ts:354</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> diff --git a/docs/interfaces/cycledetector.html b/docs/interfaces/cycledetector.html index ae58322..1f95a70 100644 --- a/docs/interfaces/cycledetector.html +++ b/docs/interfaces/cycledetector.html @@ -981,6 +981,9 @@ <li class=" tsd-kind-type-alias"> <a href="../globals.html#graphlibconstructor" class="tsd-kind-icon">Graphlib<wbr>Constructor</a> </li> + <li class=" tsd-kind-type-alias tsd-has-type-parameter"> + <a href="../globals.html#labelgenerator" class="tsd-kind-icon">Label<wbr>Generator</a> + </li> <li class=" tsd-kind-type-alias tsd-has-type-parameter"> <a href="../globals.html#multigraphedgedata" class="tsd-kind-icon">Multi<wbr>Graph<wbr>Edge<wbr>Data</a> </li> @@ -993,6 +996,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#cancontractedge" class="tsd-kind-icon">can<wbr>Contract<wbr>Edge</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#combineiterators" class="tsd-kind-icon">combine<wbr>Iterators</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#contractedge" class="tsd-kind-icon">contract<wbr>Edge</a> </li> @@ -1014,6 +1020,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#createmappediterator" class="tsd-kind-icon">create<wbr>Mapped<wbr>Iterator</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#foreach" class="tsd-kind-icon">for<wbr>Each</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#takefirst" class="tsd-kind-icon">take<wbr>First</a> </li> @@ -1093,7 +1102,7 @@ <h3>can<wbr>Add<wbr>Edge</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L108">Header.ts:108</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L110">Header.ts:110</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1139,7 +1148,7 @@ <h3>create<wbr>Vertex<wbr>Data</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L117">Header.ts:117</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L119">Header.ts:119</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1173,7 +1182,7 @@ <h3>get<wbr>Order</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L125">Header.ts:125</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L127">Header.ts:127</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1211,7 +1220,7 @@ <h3>is<wbr>Reachable</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L135">Header.ts:135</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L137">Header.ts:137</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1256,7 +1265,7 @@ <h3>map</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L143">Header.ts:143</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L145">Header.ts:145</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1287,7 +1296,7 @@ <h3>on<wbr>Vertex<wbr>Deletion</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L151">Header.ts:151</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L153">Header.ts:153</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1325,7 +1334,7 @@ <h3>supports<wbr>Order</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L156">Header.ts:156</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L158">Header.ts:158</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> diff --git a/docs/interfaces/genericgraphadapteroptions.html b/docs/interfaces/genericgraphadapteroptions.html index 7fda6c8..a715e54 100644 --- a/docs/interfaces/genericgraphadapteroptions.html +++ b/docs/interfaces/genericgraphadapteroptions.html @@ -966,6 +966,9 @@ <li class=" tsd-kind-type-alias"> <a href="../globals.html#graphlibconstructor" class="tsd-kind-icon">Graphlib<wbr>Constructor</a> </li> + <li class=" tsd-kind-type-alias tsd-has-type-parameter"> + <a href="../globals.html#labelgenerator" class="tsd-kind-icon">Label<wbr>Generator</a> + </li> <li class=" tsd-kind-type-alias tsd-has-type-parameter"> <a href="../globals.html#multigraphedgedata" class="tsd-kind-icon">Multi<wbr>Graph<wbr>Edge<wbr>Data</a> </li> @@ -978,6 +981,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#cancontractedge" class="tsd-kind-icon">can<wbr>Contract<wbr>Edge</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#combineiterators" class="tsd-kind-icon">combine<wbr>Iterators</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#contractedge" class="tsd-kind-icon">contract<wbr>Edge</a> </li> @@ -999,6 +1005,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#createmappediterator" class="tsd-kind-icon">create<wbr>Mapped<wbr>Iterator</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#foreach" class="tsd-kind-icon">for<wbr>Each</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#takefirst" class="tsd-kind-icon">take<wbr>First</a> </li> @@ -1060,7 +1069,7 @@ <h3>cycle<wbr>Detector</h3> <div class="tsd-signature tsd-kind-icon">cycle<wbr>Detector<span class="tsd-signature-symbol">:</span> <a href="cycledetector.html" class="tsd-signature-type">CycleDetector</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">></span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L18">Header.ts:18</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L20">Header.ts:20</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1075,7 +1084,7 @@ <h3>map<wbr>Constructor</h3> <div class="tsd-signature tsd-kind-icon">map<wbr>Constructor<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">MapConstructor</span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L30">Header.ts:30</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L32">Header.ts:32</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1085,9 +1094,8 @@ <h3>map<wbr>Constructor</h3> and don't want to use a global polyfill, pass the <code>Map</code> object with this options:</p> </div> - <pre><code class="lang-javascript"><span class="hljs-keyword">import</span> * <span class="hljs-keyword">as</span> <span class="hljs-built_in">Map</span> <span class="hljs-keyword">from</span> <span class="hljs-string">"core-js/es6/map"</span>; -<span class="hljs-keyword">const</span> graph = <span class="hljs-keyword">new</span> GenericGraphAdapter({<span class="hljs-attr">mapConstructor</span>: <span class="hljs-built_in">Map</span>}): -</code></pre> + <pre><code class="language-javascript"><span class="hljs-keyword">import</span> * <span class="hljs-keyword">as</span> <span class="hljs-built_in">Map</span> <span class="hljs-keyword">from</span> <span class="hljs-string">"core-js/es6/map"</span>; +<span class="hljs-keyword">const</span> graph = <span class="hljs-keyword">new</span> GenericGraphAdapter({<span class="hljs-attr">mapConstructor</span>: <span class="hljs-built_in">Map</span>}):</code></pre> </div> </section> </section> diff --git a/docs/interfaces/graphadapter.html b/docs/interfaces/graphadapter.html index add2103..5e1eeb7 100644 --- a/docs/interfaces/graphadapter.html +++ b/docs/interfaces/graphadapter.html @@ -969,6 +969,9 @@ <li class=" tsd-kind-type-alias"> <a href="../globals.html#graphlibconstructor" class="tsd-kind-icon">Graphlib<wbr>Constructor</a> </li> + <li class=" tsd-kind-type-alias tsd-has-type-parameter"> + <a href="../globals.html#labelgenerator" class="tsd-kind-icon">Label<wbr>Generator</a> + </li> <li class=" tsd-kind-type-alias tsd-has-type-parameter"> <a href="../globals.html#multigraphedgedata" class="tsd-kind-icon">Multi<wbr>Graph<wbr>Edge<wbr>Data</a> </li> @@ -981,6 +984,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#cancontractedge" class="tsd-kind-icon">can<wbr>Contract<wbr>Edge</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#combineiterators" class="tsd-kind-icon">combine<wbr>Iterators</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#contractedge" class="tsd-kind-icon">contract<wbr>Edge</a> </li> @@ -1002,6 +1008,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#createmappediterator" class="tsd-kind-icon">create<wbr>Mapped<wbr>Iterator</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#foreach" class="tsd-kind-icon">for<wbr>Each</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#takefirst" class="tsd-kind-icon">take<wbr>First</a> </li> @@ -1070,7 +1079,7 @@ <h3>get<wbr>Data</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L89">Header.ts:89</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L91">Header.ts:91</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1096,7 +1105,7 @@ <h3>get<wbr>Predecessors<wbr>Of</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L83">Header.ts:83</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L85">Header.ts:85</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1125,7 +1134,7 @@ <h3>get<wbr>Successors<wbr>Of</h3> <li class="tsd-description"> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L77">Header.ts:77</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L79">Header.ts:79</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> diff --git a/docs/interfaces/graphlibadapteroptions.html b/docs/interfaces/graphlibadapteroptions.html index 264b04f..20a0a0f 100644 --- a/docs/interfaces/graphlibadapteroptions.html +++ b/docs/interfaces/graphlibadapteroptions.html @@ -969,6 +969,9 @@ <li class=" tsd-kind-type-alias"> <a href="../globals.html#graphlibconstructor" class="tsd-kind-icon">Graphlib<wbr>Constructor</a> </li> + <li class=" tsd-kind-type-alias tsd-has-type-parameter"> + <a href="../globals.html#labelgenerator" class="tsd-kind-icon">Label<wbr>Generator</a> + </li> <li class=" tsd-kind-type-alias tsd-has-type-parameter"> <a href="../globals.html#multigraphedgedata" class="tsd-kind-icon">Multi<wbr>Graph<wbr>Edge<wbr>Data</a> </li> @@ -981,6 +984,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#cancontractedge" class="tsd-kind-icon">can<wbr>Contract<wbr>Edge</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#combineiterators" class="tsd-kind-icon">combine<wbr>Iterators</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#contractedge" class="tsd-kind-icon">contract<wbr>Edge</a> </li> @@ -1002,6 +1008,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#createmappediterator" class="tsd-kind-icon">create<wbr>Mapped<wbr>Iterator</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#foreach" class="tsd-kind-icon">for<wbr>Each</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#takefirst" class="tsd-kind-icon">take<wbr>First</a> </li> @@ -1064,7 +1073,7 @@ <h3>cycle<wbr>Detector</h3> <div class="tsd-signature tsd-kind-icon">cycle<wbr>Detector<span class="tsd-signature-symbol">:</span> <a href="cycledetector.html" class="tsd-signature-type">CycleDetector</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">></span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L57">Header.ts:57</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L59">Header.ts:59</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1079,7 +1088,7 @@ <h3>graph<wbr>Options</h3> <div class="tsd-signature tsd-kind-icon">graph<wbr>Options<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Omit</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">GraphOptions</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">"directed"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"multigraph"</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L64">Header.ts:64</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L66">Header.ts:66</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1094,7 +1103,7 @@ <h3>graphlib</h3> <div class="tsd-signature tsd-kind-icon">graphlib<span class="tsd-signature-symbol">:</span> <a href="../globals.html#graphlibconstructor" class="tsd-signature-type">GraphlibConstructor</a></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L62">Header.ts:62</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L64">Header.ts:64</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> diff --git a/docs/interfaces/graphlibvertexdata.html b/docs/interfaces/graphlibvertexdata.html index 54777d3..40d8174 100644 --- a/docs/interfaces/graphlibvertexdata.html +++ b/docs/interfaces/graphlibvertexdata.html @@ -969,6 +969,9 @@ <li class=" tsd-kind-type-alias"> <a href="../globals.html#graphlibconstructor" class="tsd-kind-icon">Graphlib<wbr>Constructor</a> </li> + <li class=" tsd-kind-type-alias tsd-has-type-parameter"> + <a href="../globals.html#labelgenerator" class="tsd-kind-icon">Label<wbr>Generator</a> + </li> <li class=" tsd-kind-type-alias tsd-has-type-parameter"> <a href="../globals.html#multigraphedgedata" class="tsd-kind-icon">Multi<wbr>Graph<wbr>Edge<wbr>Data</a> </li> @@ -981,6 +984,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#cancontractedge" class="tsd-kind-icon">can<wbr>Contract<wbr>Edge</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#combineiterators" class="tsd-kind-icon">combine<wbr>Iterators</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#contractedge" class="tsd-kind-icon">contract<wbr>Edge</a> </li> @@ -1002,6 +1008,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#createmappediterator" class="tsd-kind-icon">create<wbr>Mapped<wbr>Iterator</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#foreach" class="tsd-kind-icon">for<wbr>Each</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#takefirst" class="tsd-kind-icon">take<wbr>First</a> </li> @@ -1054,7 +1063,7 @@ <h3>gid</h3> <div class="tsd-signature tsd-kind-icon">gid<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L49">Header.ts:49</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L51">Header.ts:51</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1070,7 +1079,7 @@ <h3>order</h3> <aside class="tsd-sources"> <p>Inherited from <a href="vertexdata.html">VertexData</a>.<a href="vertexdata.html#order">order</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L10">Header.ts:10</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L12">Header.ts:12</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1086,7 +1095,7 @@ <h3>visited</h3> <aside class="tsd-sources"> <p>Inherited from <a href="vertexdata.html">VertexData</a>.<a href="vertexdata.html#visited">visited</a></p> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L12">Header.ts:12</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L14">Header.ts:14</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> diff --git a/docs/interfaces/multigraphadapteroptions.html b/docs/interfaces/multigraphadapteroptions.html index 296f9a1..76c5e2a 100644 --- a/docs/interfaces/multigraphadapteroptions.html +++ b/docs/interfaces/multigraphadapteroptions.html @@ -966,6 +966,9 @@ <li class=" tsd-kind-type-alias"> <a href="../globals.html#graphlibconstructor" class="tsd-kind-icon">Graphlib<wbr>Constructor</a> </li> + <li class=" tsd-kind-type-alias tsd-has-type-parameter"> + <a href="../globals.html#labelgenerator" class="tsd-kind-icon">Label<wbr>Generator</a> + </li> <li class=" tsd-kind-type-alias tsd-has-type-parameter"> <a href="../globals.html#multigraphedgedata" class="tsd-kind-icon">Multi<wbr>Graph<wbr>Edge<wbr>Data</a> </li> @@ -978,6 +981,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#cancontractedge" class="tsd-kind-icon">can<wbr>Contract<wbr>Edge</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#combineiterators" class="tsd-kind-icon">combine<wbr>Iterators</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#contractedge" class="tsd-kind-icon">contract<wbr>Edge</a> </li> @@ -999,6 +1005,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#createmappediterator" class="tsd-kind-icon">create<wbr>Mapped<wbr>Iterator</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#foreach" class="tsd-kind-icon">for<wbr>Each</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#takefirst" class="tsd-kind-icon">take<wbr>First</a> </li> @@ -1066,7 +1075,7 @@ <h3>graph<wbr>Factory</h3> <div class="tsd-signature tsd-kind-icon">graph<wbr>Factory<span class="tsd-signature-symbol">:</span> <a href="../globals.html#graphfactory" class="tsd-signature-type">GraphFactory</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">TEdgeData</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">TEdgeLabel</span><span class="tsd-signature-symbol">></span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L42">Header.ts:42</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L44">Header.ts:44</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1081,7 +1090,7 @@ <h3>map<wbr>Constructor</h3> <div class="tsd-signature tsd-kind-icon">map<wbr>Constructor<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">MapConstructor</span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L44">Header.ts:44</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L46">Header.ts:46</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> diff --git a/docs/interfaces/vertexdata.html b/docs/interfaces/vertexdata.html index bfa1f6c..2c44764 100644 --- a/docs/interfaces/vertexdata.html +++ b/docs/interfaces/vertexdata.html @@ -966,6 +966,9 @@ <li class=" tsd-kind-type-alias"> <a href="../globals.html#graphlibconstructor" class="tsd-kind-icon">Graphlib<wbr>Constructor</a> </li> + <li class=" tsd-kind-type-alias tsd-has-type-parameter"> + <a href="../globals.html#labelgenerator" class="tsd-kind-icon">Label<wbr>Generator</a> + </li> <li class=" tsd-kind-type-alias tsd-has-type-parameter"> <a href="../globals.html#multigraphedgedata" class="tsd-kind-icon">Multi<wbr>Graph<wbr>Edge<wbr>Data</a> </li> @@ -978,6 +981,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#cancontractedge" class="tsd-kind-icon">can<wbr>Contract<wbr>Edge</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#combineiterators" class="tsd-kind-icon">combine<wbr>Iterators</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#contractedge" class="tsd-kind-icon">contract<wbr>Edge</a> </li> @@ -999,6 +1005,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#createmappediterator" class="tsd-kind-icon">create<wbr>Mapped<wbr>Iterator</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#foreach" class="tsd-kind-icon">for<wbr>Each</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#takefirst" class="tsd-kind-icon">take<wbr>First</a> </li> @@ -1061,7 +1070,7 @@ <h3>order</h3> <div class="tsd-signature tsd-kind-icon">order<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L10">Header.ts:10</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L12">Header.ts:12</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1076,7 +1085,7 @@ <h3>visited</h3> <div class="tsd-signature tsd-kind-icon">visited<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L12">Header.ts:12</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L14">Header.ts:14</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> diff --git a/docs/interfaces/weaklyconnectedcomponent.html b/docs/interfaces/weaklyconnectedcomponent.html index d0faba3..d707374 100644 --- a/docs/interfaces/weaklyconnectedcomponent.html +++ b/docs/interfaces/weaklyconnectedcomponent.html @@ -966,6 +966,9 @@ <li class=" tsd-kind-type-alias"> <a href="../globals.html#graphlibconstructor" class="tsd-kind-icon">Graphlib<wbr>Constructor</a> </li> + <li class=" tsd-kind-type-alias tsd-has-type-parameter"> + <a href="../globals.html#labelgenerator" class="tsd-kind-icon">Label<wbr>Generator</a> + </li> <li class=" tsd-kind-type-alias tsd-has-type-parameter"> <a href="../globals.html#multigraphedgedata" class="tsd-kind-icon">Multi<wbr>Graph<wbr>Edge<wbr>Data</a> </li> @@ -978,6 +981,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#cancontractedge" class="tsd-kind-icon">can<wbr>Contract<wbr>Edge</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#combineiterators" class="tsd-kind-icon">combine<wbr>Iterators</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#contractedge" class="tsd-kind-icon">contract<wbr>Edge</a> </li> @@ -999,6 +1005,9 @@ <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#createmappediterator" class="tsd-kind-icon">create<wbr>Mapped<wbr>Iterator</a> </li> + <li class=" tsd-kind-function tsd-has-type-parameter"> + <a href="../globals.html#foreach" class="tsd-kind-icon">for<wbr>Each</a> + </li> <li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private"> <a href="../globals.html#takefirst" class="tsd-kind-icon">take<wbr>First</a> </li> @@ -1073,7 +1082,7 @@ <h3>edges</h3> <div class="tsd-signature tsd-kind-icon">edges<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Triple</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Maybe</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TEdgeData</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L362">Header.ts:362</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L364">Header.ts:364</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> @@ -1088,7 +1097,7 @@ <h3>vertices</h3> <div class="tsd-signature tsd-kind-icon">vertices<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">TVertex</span><span class="tsd-signature-symbol">[]</span></div> <aside class="tsd-sources"> <ul> - <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Header.ts#L364">Header.ts:364</a></li> + <li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Header.ts#L366">Header.ts:366</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> diff --git a/package.json b/package.json index 76b62b5..6ce43d7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "incremental-cycle-detect", - "version": "0.3.0", + "version": "0.4.0", "description": "Keeps a directed acyclic graph topologically sorted each time you add an edge or vertex to check for cycles.", "main": "dist/index.js", "scripts": { diff --git a/src/Header.ts b/src/Header.ts index 2251e54..860194c 100644 --- a/src/Header.ts +++ b/src/Header.ts @@ -1,6 +1,8 @@ -import { BinaryOperator, Maybe, Omit, Pair, Triple, TypedFunction, UnaryOperator } from "andross"; +import { BinaryOperator, Maybe, Omit, Pair, Triple, TypedFunction, TypedTriFunction, UnaryOperator } from "andross"; import { Graph, GraphOptions } from "graphlib"; +export type LabelGenerator<TVertex, TEdgeData, TEdgeLabel> = TypedTriFunction<TVertex, TVertex, TEdgeData, Maybe<TEdgeLabel>>; + /** * The data the algorithm needs to associate with each vertex. * @internal diff --git a/src/MultiGraphAdapter.ts b/src/MultiGraphAdapter.ts index bcf8bbf..48ffe55 100644 --- a/src/MultiGraphAdapter.ts +++ b/src/MultiGraphAdapter.ts @@ -1,7 +1,7 @@ import { BinaryOperator, Maybe, Pair, Quadruple, Triple, TypedFunction, UnaryOperator } from "andross"; import { GenericGraphAdapter } from "./GenericGraphAdapter"; import { ClonableAdapter, CommonAdapter, GraphFactory, MultiGraphAdapterOptions, MultiGraphEdgeData } from "./Header"; -import { createFilteredIterator, createFlatMappedIterator, createMappedIterator, EmptyIterator, takeFirst } from "./util"; +import { createFilteredIterator, createFlatMappedIterator, createMappedIterator, EmptyIterator, forEach, takeFirst } from "./util"; // When contracting an edge, we may need to combine the edge data, ie. the map // between the edge labels and the actual edge data. @@ -97,9 +97,9 @@ export class MultiGraphAdapter<TVertex = any, TEdgeData = any, TEdgeLabel = any> return new MultiGraphAdapter<TVertex, TEdgeData, TEdgeLabel>(graphFactory, 0, mapConstructor); } - private g: CommonAdapter<TVertex, MultiGraphEdgeData<TEdgeData, TEdgeLabel>> & ClonableAdapter<TVertex, MultiGraphEdgeData<TEdgeData, TEdgeLabel>>; private edgeCount: number; - private mapConstructor: MapConstructor; + private readonly g: CommonAdapter<TVertex, MultiGraphEdgeData<TEdgeData, TEdgeLabel>> & ClonableAdapter<TVertex, MultiGraphEdgeData<TEdgeData, TEdgeLabel>>; + private readonly mapConstructor: MapConstructor; private constructor(graphFactory: GraphFactory<TVertex, TEdgeData, TEdgeLabel>, edgeCount: number, mapConstructor: MapConstructor) { this.g = graphFactory(); @@ -151,10 +151,7 @@ export class MultiGraphAdapter<TVertex = any, TEdgeData = any, TEdgeLabel = any> * reversed for convenience. * @see {@link MultiGraphAdapter}#addEdge */ - addLabeledEdge(from: TVertex, to: TVertex, label: Maybe<TEdgeLabel>, data?: TEdgeData): boolean; - /** @deprecated Specify a label, even if it is `undefined`. Otherwise, use `addEdge`. */ - addLabeledEdge(from: TVertex, to: TVertex, label?: TEdgeLabel, data?: TEdgeData): boolean; - addLabeledEdge(from: TVertex, to: TVertex, label?: TEdgeLabel, data?: TEdgeData) { + addLabeledEdge(from: TVertex, to: TVertex, label: Maybe<TEdgeLabel>, data?: TEdgeData): boolean { return this.addEdge(from, to, data, label); } @@ -265,10 +262,64 @@ export class MultiGraphAdapter<TVertex = any, TEdgeData = any, TEdgeLabel = any> /** * This contracts two vertices, ie. all edges between the given vertices. - * See {@link CommonAdapter}#contractEdge. + * @see {@link MultiGraphAdapter}#contractLabeledEdge */ contractEdge(from: TVertex, to: TVertex, vertexMerger?: BinaryOperator<TVertex>, edgeMerger?: BinaryOperator<TEdgeData>): boolean { - return this.g.contractEdge(from, to, vertexMerger, createMerger(edgeMerger, this.mapConstructor)); + // Check how many labeled edges would be deleted. + let deletionCount = 0; + const data = this.g.getEdgeData(from, to); + if (data !== undefined) { + deletionCount = data.size; + } + // Perform the contraction + const wasContracted = this.g.contractEdge(from, to, vertexMerger, createMerger(edgeMerger, this.mapConstructor)); + // Update the labeled edge count iff the edge could be contracted. + if (wasContracted) { + this.edgeCount -= deletionCount; + } + // Return the result + return wasContracted; + } + + /** + * This contract a specific labeled edge between the given vertices. Note that cycles are not allowed, so + * if there exists more than one edge between the given vertices, the contraction cannot be performed as + * that would create a cycle. + * @param from Source vertex of the edge. + * @param to Target vertex of the edge. + * @param label Label of the edge to be deleted. + * @param vertexMerger The vertex that replaces the two old vertices. If not given, defaults to `from`. + * @param dataMerger Another vertex may be connected two both of the vertices that are to be contracted. + * In this case, their edge data needs to be merged. If not given, defaults to taking the edge data from + * one edge. + * @return `true` iff the edge was contracted. + * @throws If vertex merger returns a vertex that is already contained in the graph. + * @see {@link MultiGraphAdapter}#contractEdge + */ + contractLabeledEdge(from: TVertex, to: TVertex, label?: TEdgeLabel, vertexMerger?: BinaryOperator<TVertex>, edgeMerger?: BinaryOperator<TEdgeData>): boolean { + // Cannot contract edge if there is no edge or more than one edge between the given vertices. + const data = this.g.getEdgeData(from, to); + if (data === undefined || data.size !== 1) { + return false; + } + // Only one edge betweem the given vertices, do a normal edge contraction. + return this.contractEdge(from, to, vertexMerger, edgeMerger); + } + + /** + * This check if a specific labeled edge between the given vertices can be contracted. Note that cycles are not + * allowed, so if there exists more than one edge between the given vertices, the contraction cannot be + * performed as that would create a cycle. + * @param from Source vertex of the edge. + * @param to Target vertex of the edge. + * @param label Label of the edge to be deleted. + * @return `true` iff the edge can be contracted, `false` otherwise. + */ + canContractLabeledEdge(from: TVertex, to: TVertex, label?: TEdgeLabel): boolean { + if (label !== undefined && this.getEdgeCountBetween(from, to) !== 1) { + return false; + } + return this.canContractEdge(from, to); } canContractEdge(from: TVertex, to: TVertex): boolean { @@ -311,7 +362,20 @@ export class MultiGraphAdapter<TVertex = any, TEdgeData = any, TEdgeLabel = any> return this.deleteLabeledEdge(from, to, label); } + /** + * Deletes a vertex from the graph; and all incident egdes. + * @param vertex Vertex to be deleted. + * @return Whether the vertex was deleted. That is, it returns `false` in case the given vertex was not contained in this graph. + */ deleteVertex(vertex: TVertex): boolean { + // Update labeled edge count + forEach(data => { + const edges = data[1]; + if (edges !== undefined) { + this.edgeCount -= edges.size; + } + }, this.g.getEdgesWithDataFrom(vertex), this.g.getEdgesWithDataTo(vertex)); + // Delete the vertex return this.g.deleteVertex(vertex); } diff --git a/src/util.ts b/src/util.ts index d0ff7ae..f6228ac 100644 --- a/src/util.ts +++ b/src/util.ts @@ -1,4 +1,4 @@ -import { BinaryOperator, Maybe, Pair, Predicate, TypedFunction } from "andross"; +import { BinaryOperator, Consumer, Maybe, Pair, Predicate, TypedFunction } from "andross"; import { CommonAdapter, CycleDetector, GraphAdapter, VertexData } from "./Header"; function filterUndefined<T>(value: Maybe<T>): boolean { @@ -63,6 +63,40 @@ export function toArray<T>(it: Iterator<T>) { return arr; } +export function forEach<T>(callback: Consumer<T>, ...iterators: Iterator<T>[]): void { + for (let i = 0, j = iterators.length; i < j; ++i) { + for (let it = iterators[i], next = it.next(); !next.done; next = it.next()) { + callback(next.value); + } + } +} + +export function combineIterators<T>(...iterators: Iterator<T>[]): Iterator<T> { + let iteratorIndex = 0; + return { + next(): IteratorResult<T> { + if (iteratorIndex >= iterators.length) { + return DoneIteratorResult; + } + let res = iterators[iteratorIndex].next(); + if (res.done) { + iteratorIndex += 1; + if (iteratorIndex >= iterators.length) { + return DoneIteratorResult; + } + res = iterators[iteratorIndex].next(); + } + if (res.done) { + return DoneIteratorResult; + } + return { + done: false, + value: res.value, + }; + } + }; +} + /** * @internal * @private diff --git a/test/MultiGraphAdapterTest.ts b/test/MultiGraphAdapterTest.ts index 73da30d..080aaa8 100644 --- a/test/MultiGraphAdapterTest.ts +++ b/test/MultiGraphAdapterTest.ts @@ -133,36 +133,82 @@ export class MultiAdapterTest { expect(g.getLabeledEdgeCount()).to.equal(2); } - @test("cannot contract edge if it results in a self cycle") - contractEdgeSelfCycle() { + @test("contractEdge contracts all edges between two vertices") + contractEdgesContractsAllEdges() { // With two vertices const g1 = this.make(); - g1.addEdge(1, 2, "foo"); + g1.addEdge(1, 2, undefined, "foo"); expect(g1.canContractEdge(1 ,2)).to.be.true; - g1.addEdge(1, 2, "bar"); - expect(g1.canContractEdge(1 ,2)).to.be.false; + g1.addEdge(1, 2, undefined, "bar"); + expect(g1.getLabeledEdgeCount()).to.equal(2); + expect(g1.canContractEdge(1 ,2)).to.be.true; + expect(g1.contractEdge(1, 2)).to.be.true; + expect(g1.getLabeledEdgeCount()).to.equal(0); // With three vertices + const g2 = this.make(); + g2.addEdge(1, 2, undefined, "12"); + g2.addEdge(2, 3, undefined, "23"); + g2.addEdge(1, 3, undefined, "13"); + expect(g2.getLabeledEdgeCount()).to.equal(3); + expect(g2.canContractEdge(2, 3)).to.be.true; + expect(g2.contractEdge(2, 3)).to.be.true; + expect(g2.hasVertex(1)).to.be.true; + expect(g2.hasVertex(2)).to.be.true; + expect(g2.hasVertex(3)).to.be.false; + expect(g2.canContractEdge(1, 2)).to.be.true; + expect(g2.contractEdge(1, 2)).to.be.true; + expect(g2.getLabeledEdgeCount()).to.equal(0); + } + + @test("contractLabeledEdge only contracts the given labeled edge") + contractLabeledEdgesContractsOneEdge() { + // With two vertices + const g1 = this.make(); + g1.addEdge(1, 2, undefined, "foo"); + expect(g1.canContractLabeledEdge(1 ,2)).to.be.true; + g1.addEdge(1, 2, undefined, "bar"); + expect(g1.getLabeledEdgeCount()).to.equal(2); + expect(g1.canContractLabeledEdge(1 ,2, "foo")).to.be.false; + expect(g1.canContractLabeledEdge(1 ,2, "bar")).to.be.false; + expect(g1.contractLabeledEdge(1, 2, "foo")).to.be.false; + expect(g1.contractLabeledEdge(1, 2, "bar")).to.be.false; + expect(g1.getLabeledEdgeCount()).to.equal(2); + + // With three vertices + const g2 = this.make(); + g2.addEdge(1, 2, undefined, "12"); + g2.addEdge(2, 3, undefined, "23"); + g2.addEdge(1, 3, undefined, "13"); + expect(g2.getLabeledEdgeCount()).to.equal(3); + expect(g2.canContractLabeledEdge(2, 3, "23")).to.be.true; + expect(g2.contractLabeledEdge(2, 3, "23")).to.be.true; + expect(g2.hasVertex(1)).to.be.true; + expect(g2.hasVertex(2)).to.be.true; + expect(g2.hasVertex(3)).to.be.false; + expect(g2.canContractLabeledEdge(1, 2, "12")).to.be.false; + expect(g2.contractLabeledEdge(1, 2, "12")).to.be.false; + expect(g2.getLabeledEdgeCount()).to.equal(2); + } + + @test("contracting an edge removes it from the graph") + contractingEdgeRemovesIt() { const g = this.make(); g.addEdge(1, 2, undefined, "12"); g.addEdge(2, 3, undefined, "23"); g.addEdge(1, 3, undefined, "13"); - expect(g.canContractEdge(2, 3)).to.be.true; + + expect(g.getEdgeCount()).to.equal(3); + expect(g.getLabeledEdgeCount()).to.equal(3); + expect(iteratorLength(g.getLabeledEdges())).to.equal(3); + g.contractEdge(2, 3); + + expect(g.hasVertex(1)).to.be.true; expect(g.hasVertex(1)).to.be.true; - expect(g.hasVertex(2)).to.be.true; expect(g.hasVertex(3)).to.be.false; - expect(g.canContractEdge(1, 2)).to.be.false; - } - @test("contracting an edge removes it from the graph") - contractingEdgeRemovesIt() { - const g = this.make(); - g.addEdge(1, 2); - g.addEdge(2, 3); - g.addEdge(1, 3); - expect(g.getLabeledEdgeCount()).to.equal(3); - g.contractEdge(1, 3); + expect(g.getEdgeCount()).to.equal(1); expect(g.getLabeledEdgeCount()).to.equal(2); expect(iteratorLength(g.getLabeledEdges())).to.equal(2); } @@ -291,7 +337,25 @@ export class MultiAdapterTest { expect(toArray(g.getEdgeDataTo(3, undefined)).sort()).to.deep.equal([4, 5]); } - @test("should return the labeled successors") + @test("can add multiple edges with different label") + canAddMultipleEdgesWithDifferentLabel() { + const g = this.make(); + expect(g.getLabeledEdgeCount()).to.equal(0); + + expect(g.canAddEdge(0, 1, "foo")).to.be.true; + g.addLabeledEdge(0, 1, "foo"); + expect(g.getLabeledEdgeCount()).to.equal(1); + + expect(g.canAddEdge(0, 1, "bar")).to.be.true; + g.addLabeledEdge(0, 1, "bar"); + expect(g.getLabeledEdgeCount()).to.equal(2); + + expect(g.canAddEdge(0, 1, "foobar")).to.be.true; + g.addLabeledEdge(0, 1, "foobar"); + expect(g.getLabeledEdgeCount()).to.equal(3); + } + + @test("can add edge if no edge with the same label exists") canAddEdge() { const g = this.make(); g.addLabeledEdge(0, 1, "foo"); @@ -393,13 +457,13 @@ export class MultiAdapterTest { expect(g.addLabeledEdge(2, 3, "bar")).to.be.true; expect(g.addLabeledEdge(3, 4, "baz")).to.be.true; expect(g.addLabeledEdge(4, 1, "foo")).to.be.false; - expect(g.addLabeledEdge(4, 1)).to.be.false; + expect(g.addLabeledEdge(4, 1, undefined)).to.be.false; expect(g.addLabeledEdge(1, 2, "foo2")).to.be.true; - expect(g.addLabeledEdge(4, 1)).to.be.false; + expect(g.addLabeledEdge(4, 1, undefined)).to.be.false; expect(g.deleteEdge(1, 2, "foo")).to.be.true; - expect(g.addLabeledEdge(4, 1)).to.be.false; + expect(g.addLabeledEdge(4, 1, undefined)).to.be.false; expect(g.deleteEdge(1, 2, "foo2")).to.be.true; - expect(g.addLabeledEdge(4, 1)).to.be.true; + expect(g.addLabeledEdge(4, 1, undefined)).to.be.true; } @test("should keep all edges when contracting")