Examples of Array


Examples of org.jquantlib.math.matrixutilities.Array

            int guessIt = 0;
            for (int i = initialIndex; guessIt < x.size(); ++guessIt, ++i) {
                traits.updateGuess (ts.data(), x.get (guessIt), i);
            }
            interpolation.update();
            final Array penalties = new Array (penaltylocalisation);
            int instIterator = rateHelpersStart;
            for (int penIt = 0; instIterator != rateHelpersEnd; ++ instIterator, ++ penIt) {
                penalties.set (penIt, Math.abs (instruments[instIterator].quoteError()));
            }
            return penalties;
        }
View Full Code Here

Examples of org.jquantlib.math.matrixutilities.Array

        final double[] y = new double[x.size()];
        for(int i=0; i<x.size(); i++) {
            final double value = x.get(i);
            y[i] = exp(-value*value);
        }
        return new Array(y);
    }
View Full Code Here

Examples of org.jquantlib.math.matrixutilities.Array

        final double[] y = new double[x.size()];
        for(int i=0; i<x.size(); i++) {
            final double value = x.get(i);
            y[i] = -value*value;
        }
        return new Array(y);
    }
View Full Code Here

Examples of org.jquantlib.math.matrixutilities.Array

    private void checkNotAKnotCondition(
            final String type,
            final CubicInterpolation spline) {
        final double tolerance = 1.0e-14;

        final Array c = spline.cCoefficients();
        assertFalse(type+" interpolation failure"
                    +"\n    cubic coefficient of the first polinomial is "+c.get(0)
                    +"\n    cubic coefficient of the second polinomial is "+c.get(1),
                    abs(c.get(0)-c.get(1)) > tolerance);
        final int n=c.size();
        assertFalse(type+" interpolation failure"
                +"\n    cubic coefficient of the 2nd to last polinomial is "+c.get(n-2)
                +"\n    cubic coefficient of the last polinomial is "+c.get(n-1),
                abs(c.get(n-2)-c.get(n-1)) > tolerance);

    }
View Full Code Here

Examples of org.jruby.compiler.ir.operands.Array

    public Operand getCallArg(int argIndex, boolean restOfArgArray) {
        if (restOfArgArray == false) {
            return getCallArg(argIndex);
        }
        else if (argIndex >= callArgs.length) {
            return new Array();
        }
        else {
            Operand[] tmp = new Operand[callArgs.length - argIndex];
            for (int j = argIndex; j < callArgs.length; j++)
                tmp[j-argIndex] = callArgs[j];

            return new Array(tmp);
        }
    }
View Full Code Here

Examples of org.jruby.ir.operands.Array

                            //
                            // Since a lone splat in call args is always expanded, we convert the splat
                            // into a compound array: *n --> args-cat([], *n)
                            SplatNode splat = (SplatNode)child;
                            Variable splatArray = getValueInTemporaryVariable(s, build(splat.getValue(), s));
                            argsList.add(new CompoundArray(new Array(), splatArray));
                            return new Splat(splatArray);
                        } else {
                            Operand childOperand = build(child, s);
                            argsList.add(childOperand);
                            return childOperand;
View Full Code Here

Examples of org.wicketstuff.gmap.js.Array

     * @see GOverlay#getJSconstructor()
     */
    @Override
    public String getJSconstructor()
    {
        Array array = new Array();
        for (GLatLng gLatLng : latLngs)
        {
            array.add(gLatLng.getJSconstructor());
        }
        return ("new google.maps.Polyline({strokeWeight: " + weight + ", strokeColor: '" + color + "', strokeOpacity: " + opacity + ", path: " + array.toJS() + "})");
    }
View Full Code Here

Examples of railo.runtime.type.Array

     
       
    // pathes from system properties
        String strPathes=System.getProperty("java.class.path");
        if(strPathes!=null) {
            Array arr=ListUtil.listToArrayRemoveEmpty(strPathes,pathSeperator);
            int len=arr.size();
            for(int i=1;i<=len;i++) {
                Resource file=frp.getResource(Caster.toString(arr.get(i,""),"").trim());
                if(file.exists())
                    pathes.add(ResourceUtil.getCanonicalResourceEL(file));
            }
        }
       
View Full Code Here

Examples of tree.expression.Array

            {
                // Haxe.g:355:16: ^( SUFFIX_EXPR[$LBRACKET, $RBRACKET] ( exprList )? )
                {
                Object root_1 = (Object)adaptor.nil();
                root_1 = (Object)adaptor.becomeRoot(
                new Array(SUFFIX_EXPR, LBRACKET255, RBRACKET257)
                , root_1);

                // Haxe.g:355:59: ( exprList )?
                if ( stream_exprList.hasNext() ) {
                    adaptor.addChild(root_1, stream_exprList.nextTree());
View Full Code Here

Examples of ucar.ma2.Array

                    gradsDDF.getEnsembleDimension().getEnsembleNames();
                String[] nameArray = new String[names.size()];
                for (int i = 0; i < nameArray.length; i++) {
                    nameArray[i] = names.get(i);
                }
                Array dataArray = Array.factory(DataType.STRING,
                                      new int[] { nameArray.length },
                                      nameArray);
                v.setCachedData(dataArray, false);
            } else {
                double[] vals = dim.getValues();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.