Exemple #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);
            }
Exemple #2
0
        public SetValue Function(SetValue set)
        {
            var newSet = new SetValue(set.Name, set.Set, false);

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

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

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

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

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