Exemple #1
0
        /// <summary>
        /// Checks whether this Graph is a sub-graph of the given Graph.
        /// </summary>
        /// <param name="g">Graph.</param>
        /// <param name="mapping">Mapping of Blank Nodes.</param>
        /// <returns></returns>
        public bool IsSubGraphOf(IGraph g, out Dictionary <INode, INode> mapping)
        {
            // Set the mapping to be null
            mapping = null;

            SubGraphMatcher matcher = new SubGraphMatcher();

            if (matcher.IsSubGraph(this, g))
            {
                mapping = matcher.Mapping;
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemple #2
0
        /// <summary>
        /// Checks whether this Graph is a sub-graph of the given Graph
        /// </summary>
        /// <param name="g">Graph</param>
        /// <param name="mapping">Mapping of Blank Nodes</param>
        /// <returns></returns>
        public bool IsSubGraphOf(IGraph g, out Dictionary<INode, INode> mapping)
        {
            //Set the mapping to be null
            mapping = null;

            SubGraphMatcher matcher = new SubGraphMatcher();
            if (matcher.IsSubGraph(this, g))
            {
                mapping = matcher.Mapping;
                return true;
            }
            else
            {
                return false;
            }
        }