Ejemplo n.º 1
0
        public static IEnumerable <int> FilterStatic(Node inputTree, StaticFilterType type)
        {
            var children = inputTree.Children;

            switch (type)
            {
            case StaticFilterType.Not:
                var result = new List <int>();

                for (var i = 0; i < children.Count; i++)
                {
                    if (children[i].IsNot())
                    {
                        result.Add(i);
                    }
                }
                return(result);

            case StaticFilterType.AllButLast:
                return(Enumerable.Range(0, children.Count - 1).ToList());

            default:
                return(null);
            }
        }
Ejemplo n.º 2
0
 public static double TypeScore(StaticFilterType type) => 3;