annotate scripts/deprecated/javamethods.m @ 17691:8a54a481ecb5

Massive speed improvement in sparse min/max functions for calls like 'max(s,[],2)' (bug #40268) * dSparse.cc (SparseMatrix SparseMatrix::max (Array<octave_idx-type>&, int)) : Remove triple loop by using a local buffer (SparseMatrix SparseMatrix::min (Array<octave_idx-type>&, int)) : ditto * CSparse.cc (SparseComplexMatrix SparseComplexMatrix::max ( Array<octave_idx-type>&, int)) : Remove triple loop by using a local buffer (SparseComplexMatrix SparseComplexMatrix::min (Array<octave_idx-type>&, int)) : ditto
author David Bateman <dbateman@free.fr>
date Fri, 18 Oct 2013 23:44:44 +0200
parents b7667fcb9fbc
children d63878346099
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15625
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
1 ## Copyright (C) 2007 Michael Goffioul
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
2 ##
15746
da26f72408a7 update copyright statements in newly added java files
John W. Eaton <jwe@octave.org>
parents: 15625
diff changeset
3 ## This file is part of Octave.
15625
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
4 ##
15746
da26f72408a7 update copyright statements in newly added java files
John W. Eaton <jwe@octave.org>
parents: 15625
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
da26f72408a7 update copyright statements in newly added java files
John W. Eaton <jwe@octave.org>
parents: 15625
diff changeset
6 ## under the terms of the GNU General Public License as published by
da26f72408a7 update copyright statements in newly added java files
John W. Eaton <jwe@octave.org>
parents: 15625
diff changeset
7 ## the Free Software Foundation; either version 3 of the License, or (at
da26f72408a7 update copyright statements in newly added java files
John W. Eaton <jwe@octave.org>
parents: 15625
diff changeset
8 ## your option) any later version.
da26f72408a7 update copyright statements in newly added java files
John W. Eaton <jwe@octave.org>
parents: 15625
diff changeset
9 ##
da26f72408a7 update copyright statements in newly added java files
John W. Eaton <jwe@octave.org>
parents: 15625
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but
da26f72408a7 update copyright statements in newly added java files
John W. Eaton <jwe@octave.org>
parents: 15625
diff changeset
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
da26f72408a7 update copyright statements in newly added java files
John W. Eaton <jwe@octave.org>
parents: 15625
diff changeset
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
da26f72408a7 update copyright statements in newly added java files
John W. Eaton <jwe@octave.org>
parents: 15625
diff changeset
13 ## General Public License for more details.
15625
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
14 ##
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
15 ## You should have received a copy of the GNU General Public License
15746
da26f72408a7 update copyright statements in newly added java files
John W. Eaton <jwe@octave.org>
parents: 15625
diff changeset
16 ## along with Octave; see the file COPYING. If not, see
da26f72408a7 update copyright statements in newly added java files
John W. Eaton <jwe@octave.org>
parents: 15625
diff changeset
17 ## <http://www.gnu.org/licenses/>.
15625
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
18
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
19 ## -*- texinfo -*-
15772
0f1a143e5002 Overhaul scripts/java directory to conform to Octave core.
Rik <rik@octave.org>
parents: 15748
diff changeset
20 ## @deftypefn {Function File} {} javamethods (@var{javaobj})
0f1a143e5002 Overhaul scripts/java directory to conform to Octave core.
Rik <rik@octave.org>
parents: 15748
diff changeset
21 ## @deftypefnx {Function File} {} javamethods ("@var{classname}")
0f1a143e5002 Overhaul scripts/java directory to conform to Octave core.
Rik <rik@octave.org>
parents: 15748
diff changeset
22 ## @deftypefnx {Function File} {@var{mtd_names} =} javamethods (@dots{})
0f1a143e5002 Overhaul scripts/java directory to conform to Octave core.
Rik <rik@octave.org>
parents: 15748
diff changeset
23 ## Return the methods of a Java object or Java class in the form of a cell
15748
54e8c2527a9e style and doc fixes for newly imported Java package .m files
John W. Eaton <jwe@octave.org>
parents: 15746
diff changeset
24 ## array of strings. If no output is requested, print the result to the
54e8c2527a9e style and doc fixes for newly imported Java package .m files
John W. Eaton <jwe@octave.org>
parents: 15746
diff changeset
25 ## standard output.
15790
921912c92102 Deprecate java_invoke, replace with javaMethod.
Rik <rik@octave.org>
parents: 15785
diff changeset
26 ## @seealso{methods, fieldnames, javaMethod, javaObject}
15625
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
27 ## @end deftypefn
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
28
15772
0f1a143e5002 Overhaul scripts/java directory to conform to Octave core.
Rik <rik@octave.org>
parents: 15748
diff changeset
29 function mtd_names = javamethods (classname)
15785
42cff4396de4 Add methods.m which extends methods() to work on Java objects.
Rik <rik@octave.org>
parents: 15772
diff changeset
30
42cff4396de4 Add methods.m which extends methods() to work on Java objects.
Rik <rik@octave.org>
parents: 15772
diff changeset
31 persistent warned = false;
42cff4396de4 Add methods.m which extends methods() to work on Java objects.
Rik <rik@octave.org>
parents: 15772
diff changeset
32 if (! warned)
42cff4396de4 Add methods.m which extends methods() to work on Java objects.
Rik <rik@octave.org>
parents: 15772
diff changeset
33 warned = true;
42cff4396de4 Add methods.m which extends methods() to work on Java objects.
Rik <rik@octave.org>
parents: 15772
diff changeset
34 warning ("Octave:deprecated-function",
42cff4396de4 Add methods.m which extends methods() to work on Java objects.
Rik <rik@octave.org>
parents: 15772
diff changeset
35 "javamethods is obsolete and will be removed from a future version of Octave, please use methods instead");
42cff4396de4 Add methods.m which extends methods() to work on Java objects.
Rik <rik@octave.org>
parents: 15772
diff changeset
36 endif
15625
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
37
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
38 if (nargin != 1)
15748
54e8c2527a9e style and doc fixes for newly imported Java package .m files
John W. Eaton <jwe@octave.org>
parents: 15746
diff changeset
39 print_usage ();
15772
0f1a143e5002 Overhaul scripts/java directory to conform to Octave core.
Rik <rik@octave.org>
parents: 15748
diff changeset
40 endif
0f1a143e5002 Overhaul scripts/java directory to conform to Octave core.
Rik <rik@octave.org>
parents: 15748
diff changeset
41
15790
921912c92102 Deprecate java_invoke, replace with javaMethod.
Rik <rik@octave.org>
parents: 15785
diff changeset
42 cls_methods = javaMethod ("getMethods", "org.octave.ClassHelper", classname);
16724
b7667fcb9fbc Substitute ostrsplit() for strsplit().
Ben Abbott <bpabbott@mac.com>
parents: 16403
diff changeset
43 method_list = ostrsplit (cls_methods, ';');
15625
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
44
15772
0f1a143e5002 Overhaul scripts/java directory to conform to Octave core.
Rik <rik@octave.org>
parents: 15748
diff changeset
45 if (nargout == 0)
0f1a143e5002 Overhaul scripts/java directory to conform to Octave core.
Rik <rik@octave.org>
parents: 15748
diff changeset
46 if (! isempty (method_list))
0f1a143e5002 Overhaul scripts/java directory to conform to Octave core.
Rik <rik@octave.org>
parents: 15748
diff changeset
47 disp (method_list);
0f1a143e5002 Overhaul scripts/java directory to conform to Octave core.
Rik <rik@octave.org>
parents: 15748
diff changeset
48 endif
0f1a143e5002 Overhaul scripts/java directory to conform to Octave core.
Rik <rik@octave.org>
parents: 15748
diff changeset
49 else
0f1a143e5002 Overhaul scripts/java directory to conform to Octave core.
Rik <rik@octave.org>
parents: 15748
diff changeset
50 mtd_names = cellstr (method_list);
15625
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
51 endif
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
52
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
53 endfunction
15772
0f1a143e5002 Overhaul scripts/java directory to conform to Octave core.
Rik <rik@octave.org>
parents: 15748
diff changeset
54