Free cookie consent management tool by TermsFeed Policy Generator

source: branches/3087_Ceres_Integration/HeuristicLab.ExtLibs/HeuristicLab.NativeInterpreter/0.1/HeuristicLab.NativeInterpreter-0.1/Plugin.cs @ 17844

Last change on this file since 17844 was 17844, checked in by bburlacu, 3 years ago

#3087: Implement NativeInterpreter and ParameterOptimizer classes. The ParameterOptimizer offers an interface to Ceres and its options and to the variable projection optimization method. Added unit tests.

File size: 1.7 KB
RevLine 
[16266]1#region License Information
2/* HeuristicLab
[17180]3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
[16266]4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab 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 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab 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 HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
[17844]22using System;
23using System.IO;
24
[16266]25using HeuristicLab.PluginInfrastructure;
26
27namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
28  [Plugin("HeuristicLab.NativeInterpreter", "Provides a native (C++) interpreter for symbolic expression trees", "0.0.0.1")]
29  [PluginFile("HeuristicLab.Problems.DataAnalysis.Symbolic.NativeInterpreter-0.1.dll", PluginFileType.Assembly)]
30  public class HeuristicLabNativeInterpreterPlugin : PluginBase {
[17844]31    public override void OnLoad() {
32      base.OnLoad();
33      // add path for native dlls to PATH env variable
34
35      var is64 = Environment.Is64BitProcess;
36      string nativeDllPath = Path.Combine(Environment.CurrentDirectory, is64 ? "x64" : "x86");
37      var envPath = Environment.GetEnvironmentVariable("PATH");
38      if (!envPath.Contains(nativeDllPath))
39        Environment.SetEnvironmentVariable("PATH", envPath + ";" + nativeDllPath);
40    }
[16266]41  }
42}
Note: See TracBrowser for help on using the repository browser.