public int StructureAgreementCount(ParseNodeDrawable parseNode)
        {
            if (children.Count > 1)
            {
                var sum = 1;
                for (var i = 0; i < children.Count; i++)
                {
                    if (i < parseNode.NumberOfChildren())
                    {
                        if (!GetChild(i).GetData().GetName()
                            .Equals(parseNode.GetChild(i).GetData().GetName()))
                        {
                            sum = 0;
                            break;
                        }
                    }
                    else
                    {
                        sum = 0;
                        break;
                    }
                }

                for (var i = 0; i < children.Count; i++)
                {
                    if (i < parseNode.NumberOfChildren() && GetChild(i).GetData().GetName()
                        .Equals(parseNode.GetChild(i).GetData().GetName()))
                    {
                        sum += ((ParseNodeDrawable)GetChild(i)).StructureAgreementCount(
                            (ParseNodeDrawable)parseNode.GetChild(i));
                    }
                    else
                    {
                        for (var j = 0; j < parseNode.NumberOfChildren(); j++)
                        {
                            if (GetChild(i).GetData().GetName()
                                .Equals(parseNode.GetChild(j).GetData().GetName()))
                            {
                                sum += ((ParseNodeDrawable)GetChild(i)).StructureAgreementCount(
                                    (ParseNodeDrawable)parseNode.GetChild(j));
                                break;
                            }
                        }
                    }
                }

                return(sum);
            }

            return(0);
        }
        public int GlossAgreementCount(ParseNodeDrawable parseNode, ViewLayerType viewLayerType)
        {
            if (children.Count == 0)
            {
                if (parseNode.NumberOfChildren() == 0)
                {
                    if (GetLayerData(viewLayerType).Equals(parseNode.GetLayerData(viewLayerType)))
                    {
                        return(1);
                    }

                    return(0);
                }

                return(0);
            }

            var sum = 0;

            for (var i = 0; i < children.Count; i++)
            {
                if (i < parseNode.NumberOfChildren())
                {
                    sum += ((ParseNodeDrawable)GetChild(i)).GlossAgreementCount(
                        (ParseNodeDrawable)parseNode.GetChild(i), viewLayerType);
                }
            }

            return(sum);
        }