Example #1
0
        /// <summary>
        /// Divide by a factor.
        /// eg. (2x + 1) / (3x + 2)
        /// </summary>
        /// <param name="t">The factor to be devided by.</param>
        public void Divide(Factor t)
        {
            Factor result = new Factor();
            Factor rTerm;

            foreach (var factor in Terms)
            {
                rTerm = t.Clone();
                rTerm.Divide(factor);
                result.Add(rTerm);
            }

            Terms = result.Terms;
        }
Example #2
0
        /// <summary>
        /// Multiply a factor by a factor.
        /// (2x + 1) * (x + 3)
        /// </summary>
        /// <param name="factor"></param>
        public void Multiply(Factor factor)
        {
            Factor result = new Factor();
            Factor rTerm;

            foreach (var f in Terms)
            {
                rTerm = factor.Clone();
                rTerm.Multiply(f);
                result.Add(rTerm);
            }

            Terms = result.Terms;
        }
Example #3
0
        /// <summary>
        /// Multiply a factor by a factor.
        /// (2x + 1) * (x + 3)
        /// </summary>
        /// <param name="factor"></param>
        public void Multiply(Factor factor)
        {
            Factor result = new Factor ();
            Factor rTerm;

            foreach (var f in Terms) {
                rTerm = factor.Clone ();
                rTerm.Multiply (f);
                result.Add (rTerm);
            }

            Terms = result.Terms;
        }
Example #4
0
        /// <summary>
        /// Divide by a factor.
        /// eg. (2x + 1) / (3x + 2)
        /// </summary>
        /// <param name="t">The factor to be devided by.</param>
        public void Divide(Factor t)
        {
            Factor result = new Factor ();
            Factor rTerm;

            foreach (var factor in Terms) {
                rTerm = t.Clone ();
                rTerm.Divide (factor);
                result.Add (rTerm);
            }

            Terms = result.Terms;
        }