Uses of Interface
com.gengoai.collection.counter.Counter
-
Packages that use Counter Package Description com.gengoai.collection.counter Contains implementations for Counters and MultiCounters that are specialized object-double and object-object-double maps.com.gengoai.graph com.gengoai.graph.algorithms com.gengoai.graph.scoring com.gengoai.stream A unified stream interface that can work across Java and Spark streams.com.gengoai.stream.local com.gengoai.stream.spark -
-
Uses of Counter in com.gengoai.collection.counter
Classes in com.gengoai.collection.counter that implement Counter Modifier and Type Class Description class
BaseMapCounter<T>
Abstract implementation of a counter backed by aMap
.class
ConcurrentHashMapCounter<T>
Implementation of a Counter using a ConcurrentHashMapclass
HashMapCounter<T>
Implementation of a Counter using a HashMapMethods in com.gengoai.collection.counter that return Counter Modifier and Type Method Description Counter<T>
BaseMapCounter. adjustValues(DoubleUnaryOperator function)
default Counter<T>
Counter. adjustValues(DoubleUnaryOperator function)
Constructs a new counter made up of counts that are adjusted using the supplied function.Counter<T>
BaseMapCounter. adjustValuesSelf(DoubleUnaryOperator function)
Counter<T>
Counter. adjustValuesSelf(DoubleUnaryOperator function)
Adjust the values in-place using the supplied functionCounter<T>
BaseMapCounter. bottomN(int n)
Counter<T>
Counter. bottomN(int n)
Creates a new counter containing the N items with lowest valuesCounter<T>
BaseMapCounter. copy()
protected abstract Counter<V>
BaseMultiCounter. createCounter()
Creates a new counter.protected Counter<V>
ConcurrentHashMapMultiCounter. createCounter()
protected Counter<V>
HashMapMultiCounter. createCounter()
default Counter<T>
Counter. decrement(T item)
Decrements the count of the item by one.default Counter<T>
Counter. decrement(T item, double amount)
Decrements the count of the item by a given amountdefault Counter<T>
Counter. decrementAll(Iterable<? extends T> iterable)
Decrements all items in a given iterable by 1default Counter<T>
Counter. decrementAll(Iterable<? extends T> iterable, double amount)
Decrements all items in a given iterable by a given amountCounter<T>
BaseMapCounter. divideBySum()
default Counter<T>
Counter. divideBySum()
Divides the values in the counter by the sum and sets the sum to 1.0Counter<T>
BaseMapCounter. filterByKey(Predicate<? super T> predicate)
Counter<T>
Counter. filterByKey(Predicate<? super T> predicate)
Creates a new counter containing only those items that evaluate true for the given predicateCounter<T>
BaseMapCounter. filterByValue(DoublePredicate doublePredicate)
Counter<T>
Counter. filterByValue(DoublePredicate doublePredicate)
Creates a new counter containing only those items whose value evaluate true for the given predicateCounter<V>
BaseMultiCounter. get(K firstKey)
Counter<V>
MultiCounter. get(K firstKey)
Gets a counter of second keys associated with the first key.Counter<T>
BaseMapCounter. increment(T item, double amount)
default Counter<T>
Counter. increment(T item)
Increments the count of the item by one.Counter<T>
Counter. increment(T item, double amount)
Increments the count of the item by a given amountdefault Counter<T>
Counter. incrementAll(Iterable<? extends T> iterable)
Increments all items in a given iterable by 1default Counter<T>
Counter. incrementAll(Iterable<? extends T> iterable, double amount)
Increments all items in a given iterable by a given amount<R> Counter<R>
BaseMapCounter. mapKeys(Function<? super T,? extends R> function)
<R> Counter<R>
Counter. mapKeys(Function<? super T,? extends R> function)
Creates a new counter by mapping the items of this counter using the supplied functionCounter<T>
BaseMapCounter. merge(Counter<? extends T> other)
Counter<T>
BaseMapCounter. merge(Map<? extends T,? extends Number> other)
Counter<T>
Counter. merge(Counter<? extends T> other)
Merges the counts in one counter with this one.Counter<T>
Counter. merge(Map<? extends T,? extends Number> other)
Merges the counts in a map with this counter.static <TYPE> Counter<TYPE>
Counters. newConcurrentCounter(Counter<TYPE> counter)
Wraps a counter making each method call synchronized.static <T> Counter<T>
Counters. newConcurrentCounter(Iterable<? extends T> iterable)
Creates a newConcurrentHashMapCounter
which is initialized with the given itemsstatic <T> Counter<T>
Counters. newConcurrentCounter(Map<? extends T,? extends Number> map)
Creates a newConcurrentHashMapCounter
which is initialized by merging with the given mapstatic <T> Counter<T>
Counters. newConcurrentCounter(Stream<? extends T> stream)
Creates a newConcurrentHashMapCounter
which is initialized with the given itemsstatic <T> Counter<T>
Counters. newConcurrentCounter(T... items)
Creates a newConcurrentHashMapCounter
which is initialized with the given itemsstatic <T> Counter<T>
Counters. newCounter(Counter<? extends T> other)
Creates a newHashMapMultiCounter
which is initialized by merging with the given counterstatic <T> Counter<T>
Counters. newCounter(Iterable<? extends T> iterable)
Creates a newHashMapMultiCounter
which is initialized with the given itemsstatic <T> Counter<T>
Counters. newCounter(Map<? extends T,? extends Number> map)
Creates a newHashMapMultiCounter
which is initialized by merging with the given mapstatic <T> Counter<T>
Counters. newCounter(Stream<? extends T> stream)
Creates a newHashMapMultiCounter
which is initialized with the given itemsstatic <T> Counter<T>
Counters. newCounter(T... items)
Creates a newHashMapMultiCounter
which is initialized with the given itemsprotected abstract <R> Counter<R>
BaseMapCounter. newInstance()
New instance counter.protected <R> Counter<R>
ConcurrentHashMapCounter. newInstance()
protected <R> Counter<R>
HashMapCounter. newInstance()
static <TYPE> Counter<TYPE>
Counters. readCsv(Resource resource, Class<TYPE> keyClass)
Reads a counter from a CSV file.Counter<V>
BaseMultiCounter. remove(K item)
Counter<V>
MultiCounter. remove(K item)
Removes an item and its associated secondary keys from the counterCounter<T>
BaseMapCounter. removeAll(Iterable<T> items)
Counter<T>
Counter. removeAll(Iterable<T> items)
Removes all the given items from the counterCounter<T>
BaseMapCounter. set(T item, double count)
Counter<T>
Counter. set(T item, double count)
Sets the value of an item in the counterCounter<T>
BaseMapCounter. topN(int n)
Counter<T>
Counter. topN(int n)
Creates a new counter containing the N items with highest valuesMethods in com.gengoai.collection.counter with parameters of type Counter Modifier and Type Method Description Counter<T>
BaseMapCounter. merge(Counter<? extends T> other)
Counter<T>
Counter. merge(Counter<? extends T> other)
Merges the counts in one counter with this one.static <TYPE> Counter<TYPE>
Counters. newConcurrentCounter(Counter<TYPE> counter)
Wraps a counter making each method call synchronized.static <T> Counter<T>
Counters. newCounter(Counter<? extends T> other)
Creates a newHashMapMultiCounter
which is initialized by merging with the given counterMultiCounter<K,V>
BaseMultiCounter. set(K item, Counter<V> counter)
MultiCounter<K,V>
MultiCounter. set(K item, Counter<V> counter)
Sets the secondary keys and counts associated with a first level kekConstructor parameters in com.gengoai.collection.counter with type arguments of type Counter Constructor Description BaseMultiCounter(Map<K,Counter<V>> backingMap)
Instantiates a new Base multi counter. -
Uses of Counter in com.gengoai.graph
Methods in com.gengoai.graph that return Counter Modifier and Type Method Description default Counter<V>
Graph. getPredecessorsWeights(V vertex)
Gets the weights associated with the edges to the predecessors of the given vertex.default Counter<V>
Graph. getSuccessorWeights(V vertex)
Gets the weights associated with the edges to the successors of the given vertex.default Counter<V>
Graph. getWeights(V vertex)
Gets the weights associated with the edges of the given vertex. -
Uses of Counter in com.gengoai.graph.algorithms
Methods in com.gengoai.graph.algorithms that return Counter Modifier and Type Method Description Counter<V>
DijkstraShortestPath. singleSourceShortestDistance(V source)
Counter<V>
SingleSourceShortestPath. singleSourceShortestDistance(V source)
The distance between the source vertex and all other vertices in the graph -
Uses of Counter in com.gengoai.graph.scoring
Methods in com.gengoai.graph.scoring that return Counter Modifier and Type Method Description Counter<V>
DegreeScorer. score(Graph<V> g)
Counter<V>
PageRank. score(Graph<V> g)
Counter<V>
RandomWalkScorer. score(Graph<V> g)
Counter<V>
VertexScorer. score(Graph<V> g)
Scores the vertices in the graph -
Uses of Counter in com.gengoai.stream
Methods in com.gengoai.stream with parameters of type Counter Modifier and Type Method Description void
MCounterAccumulator. merge(Counter<? extends T> counter)
Merges the given counter with this accumulator -
Uses of Counter in com.gengoai.stream.local
Methods in com.gengoai.stream.local that return Counter Modifier and Type Method Description Counter<IN>
LocalMCounterAccumulator. value()
Methods in com.gengoai.stream.local that return types with arguments of type Counter Modifier and Type Method Description LocalMAccumulator<IN,Counter<IN>>
LocalMCounterAccumulator. copy()
Methods in com.gengoai.stream.local with parameters of type Counter Modifier and Type Method Description void
LocalMCounterAccumulator. merge(Counter<? extends IN> counter)
Method parameters in com.gengoai.stream.local with type arguments of type Counter Modifier and Type Method Description void
LocalMCounterAccumulator. merge(MAccumulator<IN,Counter<IN>> other)
-
Uses of Counter in com.gengoai.stream.spark
Methods in com.gengoai.stream.spark with parameters of type Counter Modifier and Type Method Description void
SparkMCounterAccumulator. merge(Counter<? extends E> counter)
-