コード例 #1
0
        /// <summary>
        /// Construct and return an edge for a given query and target node
        /// </summary>
        /// <returns>connected edges</returns>
        public IEdge Connect(INode source, INode target, IVFBondMatcher matcher)
        {
            NodeBuilder sourceImpl = (NodeBuilder)source;
            NodeBuilder targetImpl = (NodeBuilder)target;
            EdgeBuilder edge       = new EdgeBuilder(sourceImpl, targetImpl, matcher);

            sourceImpl.AddNeighbor(targetImpl);
            targetImpl.AddNeighbor(sourceImpl);

            sourceImpl.AddEdge(edge);
            targetImpl.AddEdge(edge);

            edgesList.Add(edge);
            return(edge);
        }
コード例 #2
0
ファイル: NodeBuilder.cs プロジェクト: ch-hristov/NCDK
 public void AddEdge(EdgeBuilder edge)
 {
     edgesList.Add(edge);
 }