Package org.jquantlib.math.matrixutilities

Examples of org.jquantlib.math.matrixutilities.Array$Range


        // TODO : review initialization
        // these are vectors in quantlib, therfor they must be initalized to default
        // values or nullable. since we have decided to write the code without null checks
        // all over the place we are going to initialze them for now to be consistent with
        // quantlib behavoir
        fixingDays_ = new Array(0);
        gearings_ = new Array(0);
        spreads_ = new Array(0);
        caps_ = new Array(0);
        floors_ = new Array(0);
        inArrears_ = false;
        zeroPayments_ = false;
    }
View Full Code Here


        inArrears_ = false;
        zeroPayments_ = false;
    }

    public final IborLeg withNotionals(/* @Real */final double notional) {
        notionals_ = new Array(new double[] { notional });// std::vector<Real>(1,notional);
        return this;
    }
View Full Code Here

        paymentAdjustment_ = convention;
        return this;
    }

    public final IborLeg withFixingDays(/* @Natural */final double fixingDays) {
        fixingDays_ = new Array(new double[] { fixingDays });// std::vector<Natural>(1,fixingDays);
        return this;
    }
View Full Code Here

        fixingDays_ = fixingDays;
        return this;
    }

    public IborLeg withGearings(/* @Real */final double gearing) {
        gearings_ = new Array(new double[] { gearing });
        return this;
    }
View Full Code Here

        gearings_ = gearings;
        return this;
    }

    public IborLeg withSpreads(/* @Spread */final double spread) {
        spreads_ = new Array(new double[] { spread });
        return this;
    }
View Full Code Here

        spreads_ = spreads;
        return this;
    }

    public IborLeg withCaps(/* @Rate */final double cap) {
        caps_ = new Array(1).fill(cap);
        return this;
    }
View Full Code Here

        caps_ = caps;
        return this;
    }

    public IborLeg withFloors(/* @Rate */final double floor) {
        floors_ = new Array(1).fill(floor);
        return this;
    }
View Full Code Here

            times[i] = dc.yearFraction (dates[0], dates[i]);
            QL.require(Closeness.isClose(times[i],times[i-1]),
            "two dates correspond to the same time under this curve's day count convention"); // TODO: message
        }

        this.interpolation = interpolator.interpolate(new Array(times), new Array(data));
        this.interpolation.update();
    }
View Full Code Here

        @Override
        public Array values(final Array x) {
            if (x.size() != 1)
                throw new IllegalArgumentException("Independent variable must be 1 dimensional");
            final Array y = new Array(1);
            y.set(0, value(x));
            return y;
        }
View Full Code Here

        // Let's enforce the assumption for the time being
        // (even though I'm not sure that I agree.)
        QL.require(end > 0.0 , "negative times not allowed"); // QA:[RG]::verified // FIXME: message

        /*@Time*/ final double dt = end/steps;
        this.times = new Array(steps+1);
        for (int i=0; i<=steps; i++) {
            times.set(i, dt*i);
        }
        this.mandatoryTimes = new Array(1).fill(end);
        this.dt = new Array(steps).fill(dt);
    }
View Full Code Here

TOP

Related Classes of org.jquantlib.math.matrixutilities.Array$Range

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.