1. Method for generating piecewise-affine multivariate functions, comprising: an online computation of a search tree is performed in order to locate an input value in a plurality of polytopes of a partition, and a subsequent generation of a corresponding affine function; and wherein a piecewise-affine (PWA) function, f PWA : D→R, defined on a compact domain D⊂R n , verifies that: 
 f PWA ( x )= f i T x+g i , xϵΩi= 1,. .. , N P wherein f i Î R n , g i Î R and Ω i are N P polytopes, which do not overlap and a joining thereof induces a polyhedral partition in a domain D; wherein each polytope is a closed region delimited by hyperplanes (h T j x+k j =0, wherein h j Î R n , k j Î R); wherein throughout a plane it is possible to distinguish N E hyperplanes which delimit the polytopes, wherein each hyperplane divides the domain in two parts, and the function f PWA is affine on each polytope, Ω i ; so that a problem of locating a desired point has an objective of finding an index i so that x Î Ω i to thus provide the affine function in that point; wherein said method comprises the steps of: forming a binary search tree from a single root, which is a first state (S[ 1 ]) which branches into two states, which are a second state (S[ 2 ]) and a third state (S[ 3 ]) which, in turn and successively, branch into two states, so that for a depth of a tree d, a number of states is 2 d −1, the 2 d−1 states of the deepest level being a leaves of the tree; locating a polytope from the Ω i polytopes containing an input vector by successively performing the comparisons (h T j x+k j <0); performing the online search tree computation so that a vector x, the computation starts from the first state (S[ 1 ]) checking if h T 1 x+k 1 <0: is correct, the computation selects a branch that leads to the second state (S[ 2 ]), if this is not correct, it selects the one that leads to the third state (S[ 3 ]), progressing in states until a state associated with the desired point is achieved; and implementing at least one of non-linear signal processing and controllers for a plant whose control surface is definable by the piecewise-affine multivariate functions.