Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* Produces compiled code for the Nelder-Mead algorithm with the objective function inlined. *) | |
(* The objective function takes the form F[parametersToOptimize..,constantParameters] *) | |
NelderMeadMinimize`Dump`CompiledNelderMead[ | |
objectiveFunction_Function | objectiveFunction_CompiledFunction, vars : {__Symbol}, const: {__Symbol}, | |
opts : OptionsPattern[NelderMeadMinimize`Dump`CompiledNelderMead] | |
] := | |
NelderMeadMinimize`Dump`CompiledNelderMead[ | |
objectiveFunction, vars, const | |
opts | |
] = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(*Original implementation*) | |
MakeInPeriodicCellOrig = | |
Compile[{x, cellwidth}, | |
First@Sort[{x, x - cellwidth, x + cellwidth}, | |
Abs[#1] < Abs[#2] &], {{Sort[_], _Real}}, | |
CompilationOptions -> {"ExpressionOptimization" -> True, | |
"InlineCompiledFunctions" -> True, | |
"InlineExternalDefinitions" -> True}, | |
RuntimeAttributes -> {Listable}, | |
"RuntimeOptions" -> "Speed" |