Search in sources :

Example 16 with Union

use of com.yahoo.sketches.theta.Union in project Gaffer by gchq.

the class UnionSerialiserTest method getExampleOutput.

@Override
protected Union getExampleOutput() {
    final Union union = SetOperation.builder().buildUnion();
    union.update(1.0D);
    union.update(2.0D);
    union.update(3.0D);
    return union;
}
Also used : Union(com.yahoo.sketches.theta.Union)

Example 17 with Union

use of com.yahoo.sketches.theta.Union in project Gaffer by gchq.

the class SketchAggregator method _apply.

@Override
protected Sketch _apply(final Sketch a, final Sketch b) {
    final Union union = Sketches.setOperationBuilder().buildUnion();
    union.update(a);
    union.update(b);
    return union.getResult();
}
Also used : Union(com.yahoo.sketches.theta.Union)

Aggregations

Union (com.yahoo.sketches.theta.Union)17 Test (org.junit.Test)4 CompactSketch (com.yahoo.sketches.theta.CompactSketch)2 Intersection (com.yahoo.sketches.theta.Intersection)2 Sketch (com.yahoo.sketches.theta.Sketch)2 Test (org.junit.jupiter.api.Test)2 Entity (uk.gov.gchq.gaffer.data.element.Entity)2 AggregateFunctionTest (uk.gov.gchq.gaffer.function.AggregateFunctionTest)2 Memory (com.yahoo.memory.Memory)1 MemoryRegion (com.yahoo.memory.MemoryRegion)1 NativeMemory (com.yahoo.memory.NativeMemory)1 AnotB (com.yahoo.sketches.theta.AnotB)1 GroupByQueryRunnerTest (io.druid.query.groupby.GroupByQueryRunnerTest)1 Date (java.util.Date)1 HashSet (java.util.HashSet)1 DataBag (org.apache.pig.data.DataBag)1 Edge (uk.gov.gchq.gaffer.data.element.Edge)1 Element (uk.gov.gchq.gaffer.data.element.Element)1 DataGenerator13 (uk.gov.gchq.gaffer.example.gettingstarted.generator.DataGenerator13)1 SerialisationException (uk.gov.gchq.gaffer.exception.SerialisationException)1