/src/main/java/net/finmath/marketdata/products/Portfolio.java
return IntStream.range( 0, products.size() + 8 ).parallel( ).mapToDouble( new IntToDoubleFunction( ) {
return IntStream.range ( 0, products.size ( ) ) .parallel ( ) .mapToDouble ( new IntToDoubleFunction ( ) {
} public Portfolio(final List<AnalyticProduct> products) { this(products, Collections.nCopies(products.size(), new Double(1.0))); } @Override public double getValue(final double evaluationTime, final AnalyticModel model) { <extra_id_0> @Override public double applyAsDouble(final int i) { return weights.get(i) * products.get(i).getValue(evaluationTime, model); } } ).sum();