Ejemplo n.º 1
0
        public Measure Reciprocal()
        {
            var t1 = new MeasureTerm(this, -1);
            var t  = new MeasureTerms {
                t1
            };

            return(new DerivedMeasure(t));
        }
Ejemplo n.º 2
0
        public static MeasureTerms Random()
        {
            var t = new MeasureTerms();

            for (var i = 0; i < GetRandom.Count(); i++)
            {
                t.Add(MeasureTerm.Random());
            }
            return(t);
        }
Ejemplo n.º 3
0
        public Measure Multiply(BaseMeasure m, bool isDivide = false)
        {
            var t1 = new MeasureTerm(this, 1);
            var t2 = isDivide ? new MeasureTerm(m, -1) : new MeasureTerm(m, 1);
            var t  = new MeasureTerms {
                t1, t2
            };

            return(new DerivedMeasure(t));
        }
Ejemplo n.º 4
0
        public Measure Multiply(DerivedMeasure m)
        {
            var t = new MeasureTerms();

            t.Add(new MeasureTerm(this, 1));
            foreach (var e in m.Terms)
            {
                t.Add(new MeasureTerm(e.Measure as BaseMeasure, e.Power));
            }
            return(new DerivedMeasure(t));
        }
Ejemplo n.º 5
0
        public Measure Exponentiation(int i)
        {
            if (i == 0)
            {
                return(new BaseMeasure());
            }
            MeasureTerm t1;

            if (i == 1)
            {
                t1 = new MeasureTerm(this);
            }
            else
            {
                t1 = new MeasureTerm(this, i);
            }
            var t = new MeasureTerms {
                t1
            };

            return(new DerivedMeasure(t));
        }