In ordinary kriging, the error variance is minimized with the constraint that the kriging weights sum-up to 1. The kriging system is then:

or, if secondary variables are accounted for:

`OK_constraints` computes the kriging system size, resizes the kriging matrix and the second member, computes the terms of the system that are associated with the constraint on the kriging weights and finally returns the system size.

`OK_constraints::OK_constraints()`Default constructor.

`template<class InputIterator, class Location, class Matrix, class Vector>`Function call operator.

unsigned int

OK_constraints::operator()(Matrix& A, Vector& b,

const Location& u,

InputIterator first_neigh, InputIterator last_neigh)

`first_neigh,last_neigh)`is a range of Neighborhood, and`Location`is a model of Location.`A`is the kriging matrix and`b`the right hand side of the kriging system.`u`is the location being estimated. The function returns the total number of neighbors, i.e. the sum of the number of neighbors in each neighborhoods. The requirements on concepts Matrix and Vector are fully described in 2.4.