Esempio n. 1
0
        private InternalCollection <R2, T> Manufacture <S, R2>(TypedCollection <S, T> other, Func <int, Stage <T>, BinaryVertex <Weighted <R>, Weighted <S>, Weighted <R2>, T> > factory, Expression <Func <Weighted <R>, int> > input1PartitionedBy, Expression <Func <Weighted <S>, int> > input2PartitionedBy, Expression <Func <Weighted <R2>, int> > outputPartitionedBy, string name)
            where S : IEquatable <S>
            where R2 : IEquatable <R2>
        {
            var output = Foundry.NewBinaryStage(this.Output, other.Output, factory, input1PartitionedBy, input2PartitionedBy, outputPartitionedBy, name);

            return(new InternalCollection <R2, T>(output, this.Immutable && other.Immutable));
        }
Esempio n. 2
0
 public static Stream <Pair <TVertex, TState>, TTime> GraphJoin <TVertex, TState, TTime>(this Stream <Pair <TVertex, TState>, TTime> values, Stream <Pair <TVertex, TVertex>, TTime> edges)
     where TTime : Time <TTime>
 {
     return(Foundry.NewBinaryStage(edges, values, (i, s) => new GraphJoinVertex <TVertex, TState, TTime>(i, s), x => x.First.GetHashCode(), y => y.First.GetHashCode(), null, "GraphJoin"));
 }
Esempio n. 3
0
 // key-value pairs on the first input are retrieved via the second input.
 public static Stream <Pair <TKey, TValue>, Epoch> KeyValueLookup <TKey, TValue>(this Stream <Pair <TKey, TValue>, Epoch> kvpairs, Stream <TKey, Epoch> requests)
 {
     return(Foundry.NewBinaryStage(kvpairs, requests, (i, s) => new KeyValueLookupVertex <TKey, TValue>(i, s), x => x.First.GetHashCode(), y => y.GetHashCode(), null, "Lookup"));
 }