So-Bogus
A c++ sparse block matrix library aimed at Second Order cone problems
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
FischerBurmeister.hpp
1 /*
2  * This file is part of So-bogus, a C++ sparse block matrix library and
3  * Second Order Cone solver.
4  *
5  * Copyright 2013 Gilles Daviet <gdaviet@gmail.com>
6  *
7  * So-bogus is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 2 of the License, or
10  * (at your option) any later version.
11 
12  * So-bogus is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16 
17  * You should have received a copy of the GNU General Public License
18  * along with So-bogus. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 
22 #ifndef BOGUS_FISCHER_BURMEISTER_HPP
23 #define BOGUS_FISCHER_BURMEISTER_HPP
24 
25 #include "../SecondOrder.fwd.hpp"
26 
27 namespace bogus {
28 
30 template< DenseIndexType Dimension, typename Scalar >
32 {
34  typedef typename Traits::Vector Vector ;
35  typedef typename Traits::Matrix Matrix ;
36 
38  static void compute( const Scalar mu, const Vector& x, const Vector& y, Vector& fb ) ;
39 
41  static void computeJacobian(
42  const Scalar mu, const Vector& x, const Vector& y,
43  Vector& fb, Matrix& dFb_dx, Matrix& dFb_dy ) ;
44 
46 
51  template <bool JacobianAsWell >
52  static void compute(
53  const Vector& x, const Vector& y, Vector& fb,
54  Matrix& dFb_dx, Matrix& dFb_dy ) ;
55 
56 } ;
57 
59 
60 template< DenseIndexType Dimension, typename Scalar, bool DeSaxceCOV >
62 {
63 
64 public:
67  typedef typename Traits::Vector Vector ;
68  typedef typename Traits::Matrix Matrix ;
69 
72  const Scalar mu,
73  const Matrix& A,
74  const Vector& b,
75  const Scalar scaling )
76  : m_mu( mu ), m_scaling( scaling ), m_A( A ), m_b( b )
77  {}
78 
80  void compute( const Vector& x, Vector& fb ) const ;
82  void computeJacobian( const Vector& x, Vector& fb, Matrix& dFb_dx ) const ;
83 
85  static void compute( const Scalar mu, const Vector& x, const Vector& y, Vector& fb ) ;
86 
87 private:
88  Scalar m_mu ;
89  Scalar m_scaling ;
90  const Matrix& m_A ;
91  const Vector& m_b ;
92 
93 } ;
94 
95 
96 
97 }
98 
99 #endif
void compute(const Vector &x, Vector &fb) const
Sets .
static void compute(const Scalar mu, const Vector &x, const Vector &y, Vector &fb)
Computation of the FB function on the cone of aperture mu.
void computeJacobian(const Vector &x, Vector &fb, Matrix &dFb_dx) const
Sets and .
FischerBurmeister(const Scalar mu, const Matrix &A, const Vector &b, const Scalar scaling)
Constructs an object modeling the function .
Definition: FischerBurmeister.hpp:71
static void computeJacobian(const Scalar mu, const Vector &x, const Vector &y, Vector &fb, Matrix &dFb_dx, Matrix &dFb_dy)
Computation of the FB function with its jacobian on the cone of aperture mu.
Binary Fischer-Burmeister function and jacobian computation.
Definition: FischerBurmeister.hpp:31
Definition: EigenProblemTraits.hpp:38
Fischer-Burmeister function and jacobian computation, with optional change of variable.
Definition: FischerBurmeister.hpp:61