`KT_constraints` adds constraints to account for the variations of the mean of the krigged variable Z. The mean is assumed to be of the form:

The kriging system at location **u** is then given by:

Kriging with trend is rarely used with secondary variables. Hence `KT_constraints` assumes no secondary variable is to be accounted for.
`KT_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 constraints on the kriging weights and finally returns the system size.

forward_iterator |
is a model of Forward Iterator. |

`KT_constraints::KT_constraints(forward_iterator begin, forward_iterator end)`Constructs a

`KT_constraint`. The range [begin,end) contains the functions*f*_{i},*i*= 1,...,*K*that define the mean of Z. These functions must be unary functions and associate to a location a value of type convertible to`double`. The prototype of each function*f*_{i}must be:`double f(location u)`where

`location`is a model of Location.`template<class InputIterator, class Location, class Matrix, class Vector>`Function call operator.

unsigned int

KT_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.