<commit_before>monoid
======

A Java implementation of the [Monoid](http://en.wikipedia.org/wiki/Monoid) algebraic structure.<commit_msg>added documentation<commit_after>monoid
======

A Java implementation of the [Monoid](http://en.wikipedia.org/wiki/Monoid) algebraic structure.

# Usage

A `org.nnsoft.trudeau.math.monoid.Monoid<E>` is a [Monoid](http://en.wikipedia.org/wiki/Monoid) model and offers the following methods:

 * `E identity()` that returns the identity value;

 * `E append( E e1, E e2 )` that returns the result of the associative binary operation between two elements of the monoid;

 * `E inverse( E element )` that returns the inverse of the input element.

A `org.nnsoft.trudeau.math.monoid.OrderedMonoid<E>` is a `org.nnsoft.trudeau.math.monoid.Monoid<E>` able to order the elements.

## Known default Monoids

 * `org.nnsoft.trudeau.math.monoid.primitive.BigDecimalWeightBaseOperations`
 * `org.nnsoft.trudeau.math.monoid.primitive.BigIntegerWeightBaseOperations`
 * `org.nnsoft.trudeau.math.monoid.primitive.DoubleWeightBaseOperations`
 * `org.nnsoft.trudeau.math.monoid.primitive.FloatWeightBaseOperations`
 * `org.nnsoft.trudeau.math.monoid.primitive.IntegerWeightBaseOperations`
 * `org.nnsoft.trudeau.math.monoid.primitive.LongWeightBaseOperations`
{'fraction_non_alphanumeric': 0.1235340109460516, 'fraction_numerical': 0.001563721657544957, 'mean_word_length': 5.530612244897959, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '436574', 'n_tokens_mistral': 422, 'n_tokens_neox': 403, 'n_words': 89}