Exemplo n.º 1
0
        private bool MatchBonds(Match match)
        {
            if (queryPath.Count == 0)
            {
                return(true);
            }

            if (!MatchBondsToHead(match))
            {
                return(false);
            }

            for (int i = 0; i < queryPath.Count - 1; i++)
            {
                IEdge queryBond  = query.GetEdge(queryPath[i], match.QueryNode);
                IBond targetBond = target.GetBond(targetPath[i], match.TargetAtom);
                if (queryBond == null)
                {
                    continue;
                }

                if (targetBond == null)
                {
                    return(false);
                }
                if (!MatchBond(queryBond, targetBond))
                {
                    return(false);
                }
            }
            return(true);
        }