Ejemplo n.º 1
0
        public override RnRFunction Mult(RnRFunction right)
        {
            var cst = right as ConstantRnRFunction;

            if (cst != null)
            {
                if (DoubleUtils.EqualZero(cst.Value))
                {
                    return(RnRFunctions.Constant(0.0, cst.Dim));
                }

                return(new ExpAffineRnRFunction(cst.Value * add, mults.Map(m => m * cst.Value)));
            }

            return(base.Mult(right));
        }
Ejemplo n.º 2
0
        public override RnRFunction Mult(RnRFunction right)
        {
            var cst = right as ConstantRnRFunction;

            if (cst != null)
            {
                return(new ExpAffineRnRFunction(cst.Value * weight, mults));
            }

            var expAff = right as ExpAffineRnRFunction;

            if (expAff != null)
            {
                return(new ExpAffineRnRFunction(expAff.weight * weight, expAff.mults.Add(mults)));
            }

            return(base.Mult(right));
        }
Ejemplo n.º 3
0
 public virtual RnRFunction Mult(RnRFunction right)
 {
     return(new ProductRnRFunction(this, right));
 }