Changed line 22 from:
to:
Changed line 35 from:
to:
Changed line 40 from:
to:
Changed line 60 from:
to:
Changed lines 73-74 from:
F1 = AffFunction(-1)
F1.feval(1)
to:
F1 = AffFunction( -1 )
F1.feval( 1 )
Changed line 94 from:
to:
Changed line 117 from:
F3 = InfNormFunction(diag([1,2]))
to:
F3 = InfNormFunction( diag([1, 2]) )
Changed line 121 from:
to:
Changed line 129 from:
F4 = OneNormFunction(diag([2,3]))
to:
F4 = OneNormFunction( diag([2, 3]) )
Changed lines 119-123 from:
and is useful for representing linear performance criteria.
[[#OneNormFunction]]
!!! The '''OneNormFunction''' object - one norm function
The @@OneNormFunction@@ object represents a function @@y = sum( abs(Q*x) )@@ that returns always positive values. The object can be constructed by providing the matrix @@Q@@ as an argument
to:
and is useful for representing a performance criterion. The evaluation of the function is achieved via @@feval@@ method, i.e.
Changed line 121 from:
F4 = OneNormFunction(diag([-2,3]))
to:
Changed lines 123-131 from:
and is useful for representing linear performance criteria.
to:
[[#OneNormFunction]]
!!! The '''OneNormFunction''' object - one norm function
The @@OneNormFunction@@ object represents a function @@y = sum( abs(Q*x) )@@ that returns always positive values. The object can be constructed by providing the matrix @@Q@@ as an argument
(:source lang=MATLAB -getcode:) [@
F4 = OneNormFunction(diag([-2,3]))
@]
and is useful for representing a performance criterion. Function evaluation proceeds via overloaded @@feval@@ method that applies for all objects derived from @@Function@@ class.
Changed lines 115-116 from:
to:
The @@InfNormFunction@@ object represents a function @@y = max( abs(Q*x) )@@ that returns always positive values. The object can be constructed by providing the matrix @@Q@@ as an argument
(:source lang=MATLAB -getcode:) [@
F3 = InfNormFunction(diag([1,2]))
@]
and is useful for representing linear performance criteria.
Changed lines 123-127 from:
to:
The @@OneNormFunction@@ object represents a function @@y = sum( abs(Q*x) )@@ that returns always positive values. The object can be constructed by providing the matrix @@Q@@ as an argument
(:source lang=MATLAB -getcode:) [@
F4 = OneNormFunction(diag([-2,3]))
@]
and is useful for representing linear performance criteria.
Changed line 53 from:
After construction of the object, the function can be evaluated using @@feval@@ method inherited from @@Function@@ class. For instance, the value of the function for the point @@x=[1;1]@@ can be obtained as
to:
The stored matrices are accessible in the appropriate fields:
Changed lines 55-56 from:
to:
Changed line 58 from:
Based on the dimensions of the input matrices @@F@@, and @@g@@, the domain and range of the affine function can be determined. The dimension of the domain space can be retrieved by referring to @@D@@ property
to:
After construction of the object, the function can be evaluated using @@feval@@ method inherited from @@Function@@ class. For instance, the value of the function for the point @@x=[1;1]@@ can be obtained as
Changed line 60 from:
to:
Changed line 62 from:
and the range by referring to @@R@@ property
to:
Based on the dimensions of the input matrices @@F@@, and @@g@@, the domain and range of the affine function can be determined. The dimension of the domain space can be retrieved by referring to @@D@@ property
Changed line 64 from:
to:
Changed lines 66-67 from:
If no matrix @@g@@ is provided as input, it is considered as zero-value, e.g.
to:
and the range by referring to @@R@@ property
Changed lines 68-69 from:
F1 = AffFunction(-1)
F1.feval(1)
to:
Changed lines 71-73 from:
[[#QuadFunction]]
!!! The '''QuadFunction''' object - quadratic function
The @@QuadFunction@@ object represents quadratic functions in the form @@y = x'*H*x + F*x + g@@. It stores data of the matrices @@H@@, @@F@@, and @@g@@ as properties of the object. To create a quadratic function one has to provide the corresponding matrices, e.g.
to:
If no matrix @@g@@ is provided as input, it is considered as zero-value, e.g.
Changed lines 73-76 from:
H = eye(2);
F = [-2, 3];
g = 1;
F2 = QuadFunction(H, F, g)
to:
F1 = AffFunction(-1)
F1.feval(1)
Added lines 76-111:
[[#QuadFunction]]
!!! The '''QuadFunction''' object - quadratic function
The @@QuadFunction@@ object represents quadratic functions in the form @@y = x'*H*x + F*x + g@@. It stores data of the matrices @@H@@, @@F@@, and @@g@@ as properties of the object. To create a quadratic function one has to provide the corresponding matrices, e.g.
(:source lang=MATLAB -getcode:) [@
H = eye(2);
F = [-2, 3];
g = 1;
F2 = QuadFunction(H, F, g)
@]
The matrices can be accessed by referring to the properties with the same name:
(:source lang=MATLAB -getcode:) [@
F2.H
F2.F
F2.g
@]
Evaluation of the function is achieved by @@feval@@ method for a particular value of a point, e.g.
(:source lang=MATLAB -getcode:) [@
F2.feval([0;-1])
@]
The dimensions of the domain and range are accessible from @@D@@ and @@R@@ property:
(:source lang=MATLAB -getcode:) [@
F2.D
F2.R
@]
Object can be constructed without providing the matrices @@F@@, and @@g@@. In this case the values for the matrices @@F@@, and @@g@@ are considered as zeros:
(:source lang=MATLAB -getcode:) [@
F2 = QuadFunction(-1)
F2.H
F2.F
F2.g
@]
Changed lines 74-80 from:
to:
The @@QuadFunction@@ object represents quadratic functions in the form @@y = x'*H*x + F*x + g@@. It stores data of the matrices @@H@@, @@F@@, and @@g@@ as properties of the object. To create a quadratic function one has to provide the corresponding matrices, e.g.
(:source lang=MATLAB -getcode:) [@
H = eye(2);
F = [-2, 3];
g = 1;
F2 = QuadFunction(H, F, g)
@]
Changed line 33 from:
To evaluate the function stored in the @@Function@@, one can use an overloaded @@feval@@ method
to:
To evaluate the function stored in the @@Function@@ for a particular value of the point @@x=[1;1]@@, one can use an overloaded @@feval@@ method
Changed line 53 from:
After construction of the object, the function can be evaluated using @@feval@@ method inherited from @@Function@@ class:
to:
After construction of the object, the function can be evaluated using @@feval@@ method inherited from @@Function@@ class. For instance, the value of the function for the point @@x=[1;1]@@ can be obtained as
Changed lines 46-48 from:
!!! The '''AffFunction''' object
to:
!!! The '''AffFunction''' object - affine function
The @@AffFunction@@ object represents an affine function in the form @@y = F*x + g@@. It stores data of the matrices @@F@@, and @@g@@ as properties of the object. To create an affine function one has to provide the corresponding matrices, e.g.
(:source lang=MATLAB -getcode:) [@
F = [1, 0];
g = 2;
F1 = AffFunction(F, g)
@]
After construction of the object, the function can be evaluated using @@feval@@ method inherited from @@Function@@ class:
(:source lang=MATLAB -getcode:) [@
F1.feval([1;1])
@]
Based on the dimensions of the input matrices @@F@@, and @@g@@, the domain and range of the affine function can be determined. The dimension of the domain space can be retrieved by referring to @@D@@ property
(:source lang=MATLAB -getcode:) [@
F1.D
@]
and the range by referring to @@R@@ property
(:source lang=MATLAB -getcode:) [@
F1.R
@]
If no matrix @@g@@ is provided as input, it is considered as zero-value, e.g.
(:source lang=MATLAB -getcode:) [@
F1 = AffFunction(-1)
F1.feval(1)
@]
Changed lines 73-75 from:
!!! The '''QuadFunction''' object
to:
!!! The '''QuadFunction''' object - quadratic function
Changed lines 77-79 from:
!!! The '''InfNormFunction''' object
to:
!!! The '''InfNormFunction''' object - infinity norm function
Changed line 81 from:
!!! The '''OneNormFunction''' object
to:
!!! The '''OneNormFunction''' object - one norm function
Changed lines 13-14 from:
!!! The @@Function@@ object is the top-level class for representation of functions. It stores a function handle and the data corresponding to the function. The function handle is a Matlab concept for representing functions (see @@ help function_handle@@) which has been adopted in the @@Function@@ object.
As an example, consider a function y = 2*x that can be represented as anonymous function @@y = @(x) 2*x@@ in Matlab. The @@Function@@ object can be created as follows
to:
!!! The '''Function''' object - general functions
The @@Function@@ object is the top-level class for representation of functions. It stores a function handle and the data corresponding to the function. The function handle is a Matlab concept for representing functions (see @@ help function_handle@@) which has been adopted in the @@Function@@ object.
As an example, consider a function y = 2*x that can be represented as anonymous function [@y = @(x) 2*x@] in Matlab. The @@Function@@ object can be created as follows
Changed line 27 from:
The user data can be employed for parametrization of the function. Consider a function @@y=p(1)*x(1)^2 + p(2)*x(2) + p(3)@ that is parametrized in the variable "p" that can be modified. The @@Function@@ object can be constructed by pointing to the parameters in the user data. Note that the object must be constructed first in order to refer to the stored data as shown here:
to:
The user data can be employed for parametrization of the function. Consider a function @@y=p(1)*x(1)^2 + p(2)*x(2) + p(3)@@ that is parametrized in the variable "p" that can be modified. The @@Function@@ object can be constructed by pointing to the parameters in the user data. Note that the object must be constructed first in order to refer to the stored data as shown here:
Changed line 3 from:
* [[Geometry.Functions#Function | General '''Function''' object]]
to:
* [[Geometry.Functions#Function | The '''Function''' object - general functions]]
Changed lines 13-41 from:
!!! The '''Function''' object
to:
!!! The @@Function@@ object is the top-level class for representation of functions. It stores a function handle and the data corresponding to the function. The function handle is a Matlab concept for representing functions (see @@ help function_handle@@) which has been adopted in the @@Function@@ object.
As an example, consider a function y = 2*x that can be represented as anonymous function @@y = @(x) 2*x@@ in Matlab. The @@Function@@ object can be created as follows
(:source lang=MATLAB -getcode:) [@
y = @(x) 2*x
F = Function(y)
@]
which accepts the function handle as an argument. Arbitrary user data can be stored with the function which are provided as a second argument. For instance,
(:source lang=MATLAB -getcode:) [@
z=@(x) sum(x)
d.name = 'summation method';
d.date = date;
F = Function(z, d)
@]
The user data can be employed for parametrization of the function. Consider a function @@y=p(1)*x(1)^2 + p(2)*x(2) + p(3)@ that is parametrized in the variable "p" that can be modified. The @@Function@@ object can be constructed by pointing to the parameters in the user data. Note that the object must be constructed first in order to refer to the stored data as shown here:
(:source lang=MATLAB -getcode:) [@
d.p = [1, -0.5, 0.3];
F = Function([], d)
F.setHandle(@(x) F.Data.p(1)*x(1)^2 + F.Data.p(2)*x(2) + F.Data.p(3))
@]
To evaluate the function stored in the @@Function@@, one can use an overloaded @@feval@@ method
(:source lang=MATLAB -getcode:) [@
F.feval([1;1])
@]
By changing the parameters, the function value changes as well
(:source lang=MATLAB -getcode:) [@
F.Data.p(3) = 0.5;
F.feval([1;1])
@]