Search in sources :

Example 36 with Pair

use of suite.adt.pair.Pair in project suite by stupidsing.

the class ChrDblFunUtil method mapChrDbl.

public static ChrDblSource mapChrDbl(ChrDbl_Chr kf0, ChrDbl_Dbl vf0, ChrDblSource source2) {
    ChrDbl_Chr kf1 = kf0.rethrow();
    ChrDbl_Dbl vf1 = vf0.rethrow();
    ChrDblPair pair1 = ChrDblPair.of((char) 0, (double) 0);
    return pair -> {
        boolean b = source2.source2(pair1);
        if (b)
            pair.update(kf1.apply(pair1.t0, pair1.t1), vf1.apply(pair1.t0, pair1.t1));
        return b;
    };
}
Also used : ChrTest(suite.primitive.ChrPrimitives.ChrTest) Iterator(java.util.Iterator) LogUtil(suite.os.LogUtil) Source2(suite.util.FunUtil2.Source2) ChrDblPair(suite.primitive.adt.pair.ChrDblPair) Source(suite.util.FunUtil.Source) NullableSyncQueue(suite.util.NullableSyncQueue) Thread_(suite.util.Thread_) Fun(suite.util.FunUtil.Fun) Pair(suite.adt.pair.Pair) Sink(suite.util.FunUtil.Sink) Fail(suite.util.Fail) DblTest(suite.primitive.DblPrimitives.DblTest) ChrDblPair(suite.primitive.adt.pair.ChrDblPair)

Aggregations

Pair (suite.adt.pair.Pair)36 ArrayList (java.util.ArrayList)22 List (java.util.List)22 Read (suite.streamlet.Read)22 HashMap (java.util.HashMap)16 Map (java.util.Map)16 Node (suite.node.Node)14 Fail (suite.util.Fail)13 Fun (suite.util.FunUtil.Fun)12 Reference (suite.node.Reference)11 Tree (suite.node.Tree)10 TermOp (suite.node.io.TermOp)10 Set (java.util.Set)9 Atom (suite.node.Atom)9 Int (suite.node.Int)9 As (suite.streamlet.As)8 IOException (java.io.IOException)7 HashSet (java.util.HashSet)7 Streamlet (suite.streamlet.Streamlet)7 Time (suite.trade.Time)6