Exemplo n.º 1
0
        public static MeasureTerm Random()
        {
            var t = new MeasureTerm();

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

            return(new DerivedMeasure(t));
        }
Exemplo 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));
        }
Exemplo n.º 4
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));
        }