Mercurial > hg > octave-lyh
annotate liboctave/cruft/dassl/ddanrm.f @ 16499:facf00ce97d3
gui: configurable synchronization between file browser and octave directory
* default-qt-settings: all settings of the file browser are now located
in its section, new setting sync_octave_directory
* files-dock-widget.cc(constructor): make QToolBar and QAction variables local,
add two buttons for syncing from octave to file browser and vice versa,
change status-tips into tool-tips
* files-dock-widget.cc(set_current_directory):
do not emit signal displayed_directory_changed (would change octave dir)
* files-dock-widget.cc(do_sync_octave_directory): new function for manually
setting the octave dir to the one in the file browser
* files-dock-widget.cc(do_sync_browser_directory): new function for manually
setting the file browser to the octave directory
* files-dock-widget.cc(update_octave_directory): new function called from the
main-window when the octave directory has changed
* files-doc-widget.cc(display_directory): new second parameter (bool, default is
true) determining whether the signal with the new displayed directory should
be emitted if synchronizing is enabled
* files-dock-widget.cc(notice-settings): read new setting, enalbe or disable the
sync buttons and set file browser to octave directory depending on setting
* files-dock-widget.h: removed QToolBar and QAction variibles, new varaibles for
storing the actual octave directory and whether syncing is desired or not, new
functions (do_sync_octave_directory, do_sync_browser_directory,
update_octave_directory), function display_directory with second parameter
(bool, default true)
* libgui/src/icons/ok.png,libgui/src/icons/reload.png: new icons for the toolbar
* main-window.cc(change_directory): call new function update_octave_directory
instead of display_directory
* main-window.cc(construct-window-menu): rename "Current Directory" into
"File Browser"
* libgui/src/module.mk: new files icons/ok.png and icons/reload.png
* settings-dialog.cc(constructor,write_changed_settings): all files-dock-widgets
settings in a section, new setting sync_octave_directory
* settings-dialog.ui: new setting sync_octave_directory
author | Torsten <ttl@justmail.de> |
---|---|
date | Thu, 11 Apr 2013 19:01:55 +0200 |
parents | 648dabbb4c6b |
children |
rev | line source |
---|---|
2329 | 1 DOUBLE PRECISION FUNCTION DDANRM (NEQ, V, WT, RPAR, IPAR) |
2 C***BEGIN PROLOGUE DDANRM | |
3 C***SUBSIDIARY | |
4 C***PURPOSE Compute vector norm for DDASSL. | |
5 C***LIBRARY SLATEC (DASSL) | |
6 C***TYPE DOUBLE PRECISION (SDANRM-S, DDANRM-D) | |
7 C***AUTHOR PETZOLD, LINDA R., (LLNL) | |
8 C***DESCRIPTION | |
9 C----------------------------------------------------------------------- | |
10 C THIS FUNCTION ROUTINE COMPUTES THE WEIGHTED | |
11 C ROOT-MEAN-SQUARE NORM OF THE VECTOR OF LENGTH | |
12 C NEQ CONTAINED IN THE ARRAY V,WITH WEIGHTS | |
13 C CONTAINED IN THE ARRAY WT OF LENGTH NEQ. | |
14 C DDANRM=SQRT((1/NEQ)*SUM(V(I)/WT(I))**2) | |
15 C----------------------------------------------------------------------- | |
16 C***ROUTINES CALLED (NONE) | |
17 C***REVISION HISTORY (YYMMDD) | |
18 C 830315 DATE WRITTEN | |
19 C 901009 Finished conversion to SLATEC 4.0 format (F.N.Fritsch) | |
20 C 901019 Merged changes made by C. Ulrich with SLATEC 4.0 format. | |
21 C 901026 Added explicit declarations for all variables and minor | |
22 C cosmetic changes to prologue. (FNF) | |
23 C***END PROLOGUE DDANRM | |
24 C | |
25 INTEGER NEQ, IPAR(*) | |
26 DOUBLE PRECISION V(NEQ), WT(NEQ), RPAR(*) | |
27 C | |
28 INTEGER I | |
29 DOUBLE PRECISION SUM, VMAX | |
30 C | |
31 C***FIRST EXECUTABLE STATEMENT DDANRM | |
32 DDANRM = 0.0D0 | |
33 VMAX = 0.0D0 | |
34 DO 10 I = 1,NEQ | |
35 IF(ABS(V(I)/WT(I)) .GT. VMAX) VMAX = ABS(V(I)/WT(I)) | |
36 10 CONTINUE | |
37 IF(VMAX .LE. 0.0D0) GO TO 30 | |
38 SUM = 0.0D0 | |
39 DO 20 I = 1,NEQ | |
40 20 SUM = SUM + ((V(I)/WT(I))/VMAX)**2 | |
41 DDANRM = VMAX*SQRT(SUM/NEQ) | |
42 30 CONTINUE | |
43 RETURN | |
44 C------END OF FUNCTION DDANRM------ | |
45 END |