本文整理了Java中java.util.stream.DoubleStream.concat()
方法的一些代码示例,展示了DoubleStream.concat()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DoubleStream.concat()
方法的具体详情如下:
包路径:java.util.stream.DoubleStream
类名称:DoubleStream
方法名:concat
暂无
代码示例来源:origin: aol/cyclops
@Deprecated //moved to cyclops.companion.Functions
public static Function<? super ReactiveSeq<Double>, ? extends ReactiveSeq<Double>> concatDoubles( ReactiveSeq<Double> b){
return a->fromSpliterator(DoubleStream.concat(a.mapToDouble(i->i),b.mapToDouble(i->i)).spliterator());
}
代码示例来源:origin: aol/cyclops
public static Function<? super ReactiveSeq<Double>, ? extends ReactiveSeq<Double>> concatDoubles( ReactiveSeq<Double> b){
return a->ReactiveSeq.fromSpliterator(DoubleStream.concat(a.mapToDouble(i->i),b.mapToDouble(i->i)).spliterator());
}
代码示例来源:origin: de.sciss/jacop
/**
* @param store current store
* @param list variables which are being multiplied by weights.
* @param weights weight for each variable.
* @param rel the relation, one of "==", "{@literal <}", "{@literal >}", "{@literal <=}", "{@literal >=}", "{@literal !=}"
* @param sum variable containing the sum of weighted variables.
*/
public Linear(Store store, FloatVar[] list, double[] weights, String rel, FloatVar sum) {
checkInputForNullness(new String[] {"list", "weights", "rel", "sum"}, new Object[][] {list, {weights}, {rel}, {sum}});
commonInitialization(store, Stream.concat(Arrays.stream(list), Stream.of(sum)).toArray(FloatVar[]::new),
DoubleStream.concat(Arrays.stream(weights), DoubleStream.of(-1)).toArray(), rel, 0);
}
代码示例来源:origin: radsz/jacop
/**
* @param store current store
* @param list variables which are being multiplied by weights.
* @param weights weight for each variable.
* @param rel the relation, one of "==", "{@literal <}", "{@literal >}", "{@literal <=}", "{@literal >=}", "{@literal !=}"
* @param sum variable containing the sum of weighted variables.
*/
public Linear(Store store, FloatVar[] list, double[] weights, String rel, FloatVar sum) {
checkInputForNullness(new String[] {"list", "weights", "rel", "sum"}, new Object[][] {list, {weights}, {rel}, {sum}});
commonInitialization(store, Stream.concat(Arrays.stream(list), Stream.of(sum)).toArray(FloatVar[]::new),
DoubleStream.concat(Arrays.stream(weights), DoubleStream.of(-1)).toArray(), rel, 0);
}
代码示例来源:origin: com.davidbracewell/mango
@Override
public MDoubleStream union(@NonNull MDoubleStream other) {
if (other.isReusable() && other.isEmpty()) {
return this;
} else if (other instanceof LocalDoubleStream) {
return new LocalDoubleStream(DoubleStream.concat(stream, Cast.<LocalDoubleStream>as(other).stream));
}
return new LocalDoubleStream(DoubleStream.concat(stream, DoubleStream.of(other.toArray())));
}
}//END OF LocalDoubleStream
代码示例来源:origin: one.util/streamex
/**
* Creates a lazily concatenated stream whose elements are all the elements
* of the other stream followed by all the elements of this stream. The
* resulting stream is ordered if both of the input streams are ordered, and
* parallel if either of the input streams is parallel. When the resulting
* stream is closed, the close handlers for both input streams are invoked.
*
* @param other the other stream
* @return this stream prepended by the other stream
* @see DoubleStream#concat(DoubleStream, DoubleStream)
*/
public DoubleStreamEx prepend(DoubleStream other) {
return new DoubleStreamEx(DoubleStream.concat(other, stream()), context.combine(other));
}
代码示例来源:origin: com.oath.cyclops/cyclops
@Deprecated //moved to cyclops.companion.Functions
public static Function<? super ReactiveSeq<Double>, ? extends ReactiveSeq<Double>> concatDoubles( ReactiveSeq<Double> b){
return a->fromSpliterator(DoubleStream.concat(a.mapToDouble(i->i),b.mapToDouble(i->i)).spliterator());
}
代码示例来源:origin: one.util/streamex
/**
* Creates a lazily concatenated stream whose elements are all the elements
* of this stream followed by all the elements of the other stream. The
* resulting stream is ordered if both of the input streams are ordered, and
* parallel if either of the input streams is parallel. When the resulting
* stream is closed, the close handlers for both input streams are invoked.
*
* @param other the other stream
* @return this stream appended by the other stream
* @see DoubleStream#concat(DoubleStream, DoubleStream)
*/
public DoubleStreamEx append(DoubleStream other) {
return new DoubleStreamEx(DoubleStream.concat(stream(), other), context.combine(other));
}
代码示例来源:origin: one.util/streamex
/**
* Returns a new {@code DoubleStreamEx} which is a concatenation of this
* stream and the stream containing supplied values
*
* <p>
* This is a <a href="package-summary.html#StreamOps">quasi-intermediate
* operation</a>.
*
* @param values the values to append to the stream
* @return the new stream
*/
public DoubleStreamEx append(double... values) {
if (values.length == 0)
return this;
return new DoubleStreamEx(DoubleStream.concat(stream(), DoubleStream.of(values)), context);
}
代码示例来源:origin: one.util/streamex
/**
* Returns a new {@code DoubleStreamEx} which is a concatenation of the
* stream containing supplied values and this stream
*
* <p>
* This is a <a href="package-summary.html#StreamOps">quasi-intermediate
* operation</a>.
*
* @param values the values to prepend to the stream
* @return the new stream
*/
public DoubleStreamEx prepend(double... values) {
if (values.length == 0)
return this;
return new DoubleStreamEx(DoubleStream.concat(DoubleStream.of(values), stream()), context);
}
代码示例来源:origin: com.oath.cyclops/cyclops
public static Function<? super ReactiveSeq<Double>, ? extends ReactiveSeq<Double>> concatDoubles( ReactiveSeq<Double> b){
return a->ReactiveSeq.fromSpliterator(DoubleStream.concat(a.mapToDouble(i->i),b.mapToDouble(i->i)).spliterator());
}
代码示例来源:origin: com.aol.simplereact/cyclops-react
public static Function<? super ReactiveSeq<Double>, ? extends ReactiveSeq<Double>> concatDoubles( ReactiveSeq<Double> b){
return a->fromSpliterator(DoubleStream.concat(a.mapToDouble(i->i),b.mapToDouble(i->i)).spliterator());
}
代码示例来源:origin: com.simiacryptus/mindseye
});
if (hasPlaceholders) {
deltaStream = DoubleStream.concat(DoubleStream.of(
direction.getMap().keySet().stream().filter(x -> x instanceof PlaceholderLayer).distinct().mapToDouble(layer -> {
Delta<Layer> a = direction.getMap().get(layer);
代码示例来源:origin: com.simiacryptus/mindseye-research
});
if (hasPlaceholders) {
deltaStream = DoubleStream.concat(DoubleStream.of(
direction.getMap().keySet().stream().filter(x -> toLayer(x) instanceof PlaceholderLayer).distinct().mapToDouble(id -> {
Delta<UUID> a = direction.getMap().get(id);
内容来源于网络,如有侵权,请联系作者删除!