Example #1
0
            public SetValue Function(Value id)
            {
                SetValue set = @this as SetValue;

                if (ReferenceEquals(set, null))
                {
                    throw new YAMPSetsFunctionNotMemberException("SetAdd");
                }

                if (id is MatrixValue)
                {
                    set.AddElements((id as MatrixValue).ToArray());
                }
                else
                {
                    set.Set.Add(new SetValue.ValueWrap(id));
                }
                return(set);
            }
Example #2
0
        public SetValue Function(SetValue set)
        {
            var newSet = new SetValue(set.Name, set.Set, false);

            return(newSet);
        }
Example #3
0
        public ScalarValue Function(SetValue set1)
        {
            bool eq = set1.Sorted;

            return(new ScalarValue(eq));
        }
Example #4
0
 public SetValue Function(SetValue set1, ArgumentsValue args)
 {
     return(SetValue.TUnion(set1, args));
 }
Example #5
0
        public ScalarValue Function(SetValue set1, SetValue set2)
        {
            bool eq = set1.Set.SetEquals(set2.Set);

            return(new ScalarValue(eq));
        }
Example #6
0
        public ScalarValue Function(SetValue set1, SetValue set2)
        {
            bool eq = set1.Set.IsSubsetOf(set2.Set);

            return(new ScalarValue(eq));
        }
Example #7
0
        public ScalarValue Function(SetValue set1, Value id)
        {
            bool eq = set1.Set.Contains(new SetValue.ValueWrap(id));

            return(new ScalarValue(eq));
        }
Example #8
0
 public MatrixValue Function(SetValue set1)
 {
     return(SetValue.TToMatrix(set1));
 }
Example #9
0
 public SetValue Function(SetValue set1, ArgumentsValue args)
 {
     return(SetValue.TExceptXor(set1, args));
 }
Example #10
0
 public SetValue Function(SetValue set1, ArgumentsValue args)
 {
     return(SetValue.TIntersect(set1, args));
 }