Skip to content

Commit

Permalink
Documentation corrected, module renamed according to documentation, D…
Browse files Browse the repository at this point in the history
…elphi build restored.

#17
  • Loading branch information
dvmorozov committed Sep 2, 2020
1 parent 11f4a82 commit 8c210aa
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ program bounding_box_server_demo;
uses
Vcl.Forms,
bounding_box_form in 'bounding_box_form.pas' {Form1},
downhill_simplex_handler in 'downhill_simplex_handler.pas';
bounding_box_server in 'bounding_box_server.pas';

{$R *.res}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
<DCCReference Include="bounding_box_form.pas">
<Form>Form1</Form>
</DCCReference>
<DCCReference Include="downhill_simplex_handler.pas"/>
<DCCReference Include="bounding_box_server.pas"/>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
Expand Down
12 changes: 7 additions & 5 deletions examples/optimizing_app.pas
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ interface

uses
{$IF NOT DEFINED(FPC)}
System.StrUtils,
Winapi.Windows, Winapi.Messages,
System.SysUtils, System.Variants, System.Classes,
Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs,
Vcl.StdCtrls, Vcl.Buttons, System.StrUtils, System.Types, System.Contnrs,
{$ELSE}
StrUtils,
StrUtils, Classes, Contnrs, Forms,
{$ENDIF}
Classes, SysUtils, Contnrs, Forms, RunningThread, SimpMath, Math3d,
bounding_box_server;
RunningThread, SimpMath, Math3d, bounding_box_server;

type
{ Contains all application objects. }
Expand Down Expand Up @@ -294,7 +296,7 @@ procedure TOptimizingApp.WaitForRunnerFinishing(Runners: TComponentList);
GetAsyncKeyState(27);
{ Stops calculation of other threads. }
for j := 0 to FHandlers.Count - 1 do
TDownHillSimplexHandler(FHandlers[j]).Stop;
TBoundingBoxServer(FHandlers[j]).Stop;
end;
end;
if WaitResult = WAIT_FAILED then
Expand Down
5 changes: 4 additions & 1 deletion package/DownhillSimplexAlgorithm.pas
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
interface

uses
{$IF NOT DEFINED(FPC)}
System.Types,
{$ENDIF}
Classes, Contnrs, Decisions, Algorithm, Tools, SysUtils;

type
Expand Down Expand Up @@ -104,7 +107,7 @@ TDownhillSimplexAlgorithm = class(TAlgorithm)
constructor Create(AOwner: TComponent;
AFinalTolerance: Double;
ARestartDisabled: Boolean;
AExitDerivative: Double); override;
AExitDerivative: Double); overload;
destructor Destroy; override;
// The total number of optimization cycles.
property CycleCount: Integer read FCycleCount;
Expand Down

0 comments on commit 8c210aa

Please sign in to comment.