Skip to content
Snippets Groups Projects
Select Git revision
  • b319e4491aaaa5b7d79387308685e3dcf7639556
  • master default
  • cgnsUnstructured
  • partitioning
  • poppler
  • HighOrderBLCurving
  • gmsh_3_0_4
  • gmsh_3_0_3
  • gmsh_3_0_2
  • gmsh_3_0_1
  • gmsh_3_0_0
  • gmsh_2_16_0
  • gmsh_2_15_0
  • gmsh_2_14_1
  • gmsh_2_14_0
  • gmsh_2_13_2
  • gmsh_2_13_1
  • gmsh_2_12_0
  • gmsh_2_11_0
  • gmsh_2_10_1
  • gmsh_2_10_0
  • gmsh_2_9_3
  • gmsh_2_9_2
  • gmsh_2_9_1
  • gmsh_2_9_0
  • gmsh_2_8_6
26 results

GUI.cpp

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    optimization.cpp 560.67 KiB
    /*************************************************************************
    Copyright (c) Sergey Bochkanov (ALGLIB project).
    
    >>> SOURCE LICENSE >>>
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation (www.fsf.org); either version 2 of the
    License, or (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    
    A copy of the GNU General Public License is available at
    http://www.fsf.org/licensing/licenses
    >>> END OF LICENSE >>>
    *************************************************************************/
    #include "stdafx.h"
    #include "optimization.h"
    
    // disable some irrelevant warnings
    #if (AE_COMPILER==AE_MSVC)
    #pragma warning(disable:4100)
    #pragma warning(disable:4127)
    #pragma warning(disable:4702)
    #pragma warning(disable:4996)
    #endif
    using namespace std;
    
    /////////////////////////////////////////////////////////////////////////
    //
    // THIS SECTION CONTAINS IMPLEMENTATION OF C++ INTERFACE
    //
    /////////////////////////////////////////////////////////////////////////
    namespace alglib
    {
    
    
    /*************************************************************************
    This object stores state of the nonlinear CG optimizer.
    
    You should use ALGLIB functions to work with this object.
    *************************************************************************/
    _mincgstate_owner::_mincgstate_owner()
    {
        p_struct = (alglib_impl::mincgstate*)alglib_impl::ae_malloc(sizeof(alglib_impl::mincgstate), NULL);
        if( p_struct==NULL )
            throw ap_error("ALGLIB: malloc error");
        if( !alglib_impl::_mincgstate_init(p_struct, NULL, ae_false) )
            throw ap_error("ALGLIB: malloc error");
    }
    
    _mincgstate_owner::_mincgstate_owner(const _mincgstate_owner &rhs)
    {
        p_struct = (alglib_impl::mincgstate*)alglib_impl::ae_malloc(sizeof(alglib_impl::mincgstate), NULL);
        if( p_struct==NULL )
            throw ap_error("ALGLIB: malloc error");
        if( !alglib_impl::_mincgstate_init_copy(p_struct, const_cast<alglib_impl::mincgstate*>(rhs.p_struct), NULL, ae_false) )
            throw ap_error("ALGLIB: malloc error");
    }
    
    _mincgstate_owner& _mincgstate_owner::operator=(const _mincgstate_owner &rhs)
    {
        if( this==&rhs )
            return *this;
        alglib_impl::_mincgstate_clear(p_struct);
        if( !alglib_impl::_mincgstate_init_copy(p_struct, const_cast<alglib_impl::mincgstate*>(rhs.p_struct), NULL, ae_false) )
            throw ap_error("ALGLIB: malloc error");
        return *this;