*** Dependencies ***

To build and run, nclusterbox requires the Boost and the jemalloc
libraries.  Most of GNU/Linux distributions have them in their
repositories.  Simply use your package manager to install them.
Notice however that Debian and its derivatives (including the *buntu)
split the Boost library into several packages.  If you run one of
them, you must install libjemalloc2, libjemalloc-dev, libboost-dev,
libboost-program-options and libboost-program-options-dev.

Jemalloc is not strictly required: "-ljemalloc" can be removed from
the Makefile.  However, as of 2024, using glibc's malloc (by default
on most GNU/Linux distributions) and several threads, the number of GB
given to option --remember (-r) is disrespected.  As a consequence,
there is a high risk to run out of memory.


*** Compilation ***

nclusterbox was meant to be built with either GCC version 4.9 or later
or Clang.  One can modify the variable CXX in Makefile to use another
compiler.

To install nclusterbox and its man page on a *NIX-like operating
system, execute (with administrator privileges):
# make install

If you do not have access to administrator privileges or if you do not
run a *NIX-like operating system, execute:
$ make
The executable, called nclusterbox, is created in the working
directory.  You can move it to a personal directory listed in your
PATH variable.


*** Compilation Options ***

Several options can be easily enabled (respectively disabled) in
Parameters.h by uncommenting (respectively commenting) them:

UPDATES_SUM makes nclusterbox update (rather than compute from
scratch) the sums of the membership degrees on all elements after each
addition/remotion step.  Define it.

PRUNE makes nclusterbox ignore elements that cannot be added given the
sums of the membership degrees involving them over the whole tensor.
If, later, such an element can be added, the related sum is computed
from scratch.  Define it.

VERBOSE_PARSER turns on the output (on the standard output) of
information when the input data are parsed.

DEBUG_MODIFY turns on the output (on the standard output) of
information during the modification of the patterns.  This option may
be enabled by who wishes to understand how nclusterbox modifies a
small number of patterns.  1 becomes the default argument of option
--job.  More jobs scramble the output.

DEBUG_SELECT turns on the output (on the standard output) of
information during the selection of the patterns.  This option may be
enabled by who wishes to understand how a small number of patterns are
selected.

NUMERIC_PRECISION turns ou the output (on the standard output) of the
maximal possible round-off error when internally storing a membership
degree for modifying patterns and, then, for selecting them.

NB_OF_PATTERNS turns on the output (on the standard output) of the
numbers of patterns candidates for selection, and, then, of selected
patterns.

TIME turns on the output (on the standard output) of the run time of
nclusterbox.

DETAILED_TIME turns on the output (on the standard output) of a more
detailed analysis of how the time is spent.  It lists (in this order):
- the tensor parsing time
- the tensor shifting time
- the explanatory power maximization time
- the tensor reduction time
- the selection time

GNUPLOT modifies the outputs of NUMERIC_PRECISION, NB_OF_PATTERNS,
DETAILED_TIME and TIME.  They become tab separated values.  The output
order is:
- tensor parsing time (#ifdef DETAILED_TIME)
- numeric precision for modifying patterns (#ifdef NUMERIC_PRECISION)
- tensor shifting time (#ifdef DETAILED_TIME)
- explanatory power maximization time (#ifdef DETAILED_TIME)
- number of patterns candidates for selection (#ifdef NB_OF_PATTERNS)
- numeric precision for selecting patterns (#ifdef NUMERIC_PRECISION)
- tensor reduction time (#ifdef DETAILED_TIME)
- number of selected patterns (#ifdef NB_OF_PATTERNS)
- selection time (#ifdef DETAILED_TIME)
- total time (#ifdef TIME)

If any of those compilation options is used, an output file different
from the standard output should always be defined through the runtime
option --out (-o).