Calculators are used to assign data values to individual cells in a DGGS.  The simplest form of a PYXIS DGGS Calculator: DGGS.Calculator<T> is an expression
that retrieves a cell and assigns a value.  As the number of Cells is potentially infinite, expressions are generally used to assign values.  To optimizations on 
specific queries, a DGGS.Calculator<T> function  can include additional information on the distribution of values:
  1. DGGS.Calculator.getDomain() - Returns a Selector for a region that values may exists. it guarantee no values exists outside the domain.
  2. DGGS.Calculator.getRange() - Returns a Range<T> that represent the possible range of values .
  3. DGGS.Calculator.getRange(Selector &) - Returns a Range<T> that represent the possible range of values inside the given selector. this function can always fall back to getRange()
Using this methods, Selectors and Aggregates can optimize their plan to trim the search space or return estimations.

There are 3 typses of DGGS.Calculator: 
  1. Functional - create a function that calculate a value for a given cell.
  2. Quantization - quantize an external data into a value for a given cell.
  3. Expression - merge other DGGS.Calculator using algebra functions.

Functional Values

a DGGS.Calculator can be defined using a any function. please note that using functional values there is limited opportunities to perform optimizations, tracking metadata and guarantee consistency and reproducibility of results. 


Quantization of external data

If we have external data in other standard GIS formats, we can use the default Discovery and Quantification functions to create DGGS.Calculator from those data sets.



Moreover, DGGS.Calculator overwrite many operators to allow us to create more complex expressions by typing familiar code. Moreover, this can be used as provenance and optimizations if possible.