This invention provides methods, systems and apparatus for performing fast computation
of metric queries. To achieve this, in an example embodiment, the present invention
segments metric regions into disjoint primitive atomic shapes. It then represents
these primitive atomic shapes and then performs off-line computation of their relevant
properties. As a result of the off-line computation, the execution of a query requires
a minimal number of on-line calculations resulting in a very fast query. Further
optimization occurs via storage of query histories and prioritization of queries
with respect to the access frequency of a metric space's primitive atomic shapes.