summaryrefslogtreecommitdiff
path: root/src/gipfel.cxx
diff options
context:
space:
mode:
authorJohannes Hofmann <johannes.hofmann@gmx.de>2005-04-24 07:51:17 +0000
committerJohannes Hofmann <johannes.hofmann@gmx.de>2005-04-24 07:51:17 +0000
commitaeaefa0dede2d8082c24de5e63078f3593b17b55 (patch)
treecacdb6b6895f836b8bf14510c9d41636f0013238 /src/gipfel.cxx
parent983b0fc839560702c917a805aba698b7cfe4e3fe (diff)
implement optimization using newton method
implement optimization using newton method
Diffstat (limited to 'src/gipfel.cxx')
-rw-r--r--src/gipfel.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gipfel.cxx b/src/gipfel.cxx
index 934ed75..8335abb 100644
--- a/src/gipfel.cxx
+++ b/src/gipfel.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: gipfel.cxx,v 1.11 2005/04/19 16:17:56 hofmann Exp $"
+// "$Id: gipfel.cxx,v 1.12 2005/04/24 09:51:17 hofmann Exp $"
//
// flpsed program.
//
@@ -90,6 +90,12 @@ void comp_cb(Fl_Widget *, void *) {
}
}
+void newton_cb(Fl_Widget *, void *) {
+ if (gipf) {
+ gipf->newton();
+ }
+}
+
void about_cb() {
fl_message("flpsed -- a pseudo PostScript editor\n"
"(c) Johannes Hofmann 2004, 2005\n\n"
@@ -207,6 +213,8 @@ int main(int argc, char** argv) {
t->align(FL_ALIGN_LEFT);
Fl_Button *b = new Fl_Button(200, 60, 20, 15, "comp");
b->callback(comp_cb);
+ Fl_Button *b1 = new Fl_Button(250, 60, 20, 15, "opt");
+ b1->callback(newton_cb);
scroll = new Fl_Scroll(0, 75, win->w(), win->h()-75);