         }
     }
     
+    /// Remove all elements.
+    ///
+    /// - parameter keepCapacity: If `true`, the operation preserves the
+    ///   storage capacity that the collection has, otherwise the underlying
+    ///   storage is released.  The default is `false`.
+    ///
+    /// - Complexity: O(`count of nodes`).
     public mutating func removeAll(keepCapacity: Bool = false) {
         table.removeAll(keepCapacity: keepCapacity)
     }

    }
    
    /// Return `true` iff it has link from `fromNode` to `toNode`.
    @warn_unused_result
    public func isLinked(from fromNode: Node, to toNode: Node) -> Bool {
        return linkValue(from: fromNode, to: toNode) != nil
    }
    
    @warn_unused_result
    public func linkValue(from fromNode: Node, to toNode: Node) -> Link? {
        return table[fromNode]?[toNode]
    }
    
    public mutating func updateLink(from fromNode: Node, to toNode: Node, with link: Link) -> Link? {
        if table[fromNode] == nil {
            table[fromNode] = [toNode: link]

    }
    
    /// Return `true` iff it has link with `fromNode` and `toNode`.
    ///
    /// - Complexity: Amortized O(1).
    @warn_unused_result
    public func isLinked(fromNode: Node, _ toNode: Node) -> Bool {
        return linkValue(fromNode, toNode) != nil
    }
    
    /// - Complexity: Amortized O(1).
    @warn_unused_result
    public func linkValue(fromNode: Node, _ toNode: Node) -> Link? {
        return graph.linkValue(from: fromNode, to: toNode) ?? graph.linkValue(from: toNode, to: fromNode)
    }
    
    /// - Complexity: Amortized O(1).
    public mutating func updateLink(fromNode: Node, _ toNode: Node, with link: Link) -> Link? {
        return graph.updateLink(from: fromNode, to: toNode, with: link) ?? graph.removeLink(from: toNode, to: fromNode)
    }
    
    /// - Complexity: Amortized O(1).
    public mutating func removeLink(fromNode: Node, _ toNode: Node) -> Link? {
        return graph.removeLink(from: fromNode, to: toNode) ?? graph.removeLink(from: toNode, to: fromNode)
    }
    
    /// `true` iff `self` contains `node`.
    ///
    /// - Complexity: O(`count of nodes`).
    @warn_unused_result
    public func contains(node: Node) -> Bool {
        return graph.contains(node)
    }
    
    /// `true` iff `count == 0`.
    public var isEmpty: Bool {
        return graph.isEmpty
    }
    
    /// Remove a node with all connections with it.
    ///
    /// - Complexity: O(`count of nodes`).
    public mutating func removeNode(node: Node) {
        graph.removeNode(node)
    }
    
    /// Remove all elements.
    ///
    /// - parameter keepCapacity: If `true`, the operation preserves the
    ///   storage capacity that the collection has, otherwise the underlying
    ///   storage is released.  The default is `false`.
    ///
    /// - Complexity: O(`count of nodes`).
    public mutating func removeAll(keepCapacity: Bool = false) {
        graph.removeAll(keepCapacity)
    }
