This list is closed, nobody may subscribe to it.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(10) |
Aug
(5) |
Sep
(3) |
Oct
(41) |
Nov
(41) |
Dec
(33) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(75) |
Feb
(10) |
Mar
(170) |
Apr
(174) |
May
(66) |
Jun
(11) |
Jul
(10) |
Aug
(44) |
Sep
(73) |
Oct
(28) |
Nov
(139) |
Dec
(52) |
2003 |
Jan
(35) |
Feb
(93) |
Mar
(62) |
Apr
(10) |
May
(55) |
Jun
(70) |
Jul
(37) |
Aug
(16) |
Sep
(56) |
Oct
(31) |
Nov
(57) |
Dec
(83) |
2004 |
Jan
(85) |
Feb
(67) |
Mar
(27) |
Apr
(37) |
May
(75) |
Jun
(85) |
Jul
(160) |
Aug
(68) |
Sep
(104) |
Oct
(25) |
Nov
(39) |
Dec
(23) |
2005 |
Jan
(10) |
Feb
(45) |
Mar
(43) |
Apr
(19) |
May
(108) |
Jun
(31) |
Jul
(41) |
Aug
(23) |
Sep
(65) |
Oct
(58) |
Nov
(44) |
Dec
(54) |
2006 |
Jan
(96) |
Feb
(27) |
Mar
(69) |
Apr
(59) |
May
(67) |
Jun
(35) |
Jul
(13) |
Aug
(461) |
Sep
(160) |
Oct
(399) |
Nov
(32) |
Dec
(72) |
2007 |
Jan
(316) |
Feb
(305) |
Mar
(318) |
Apr
(54) |
May
(194) |
Jun
(173) |
Jul
(282) |
Aug
(91) |
Sep
(227) |
Oct
(365) |
Nov
(168) |
Dec
(18) |
2008 |
Jan
(71) |
Feb
(111) |
Mar
(155) |
Apr
(173) |
May
(70) |
Jun
(67) |
Jul
(55) |
Aug
(83) |
Sep
(32) |
Oct
(68) |
Nov
(80) |
Dec
(29) |
2009 |
Jan
(46) |
Feb
(18) |
Mar
(95) |
Apr
(76) |
May
(140) |
Jun
(98) |
Jul
(84) |
Aug
(123) |
Sep
(94) |
Oct
(131) |
Nov
(142) |
Dec
(125) |
2010 |
Jan
(128) |
Feb
(158) |
Mar
(172) |
Apr
(134) |
May
(94) |
Jun
(84) |
Jul
(32) |
Aug
(127) |
Sep
(167) |
Oct
(109) |
Nov
(69) |
Dec
(78) |
2011 |
Jan
(39) |
Feb
(58) |
Mar
(52) |
Apr
(47) |
May
(56) |
Jun
(76) |
Jul
(55) |
Aug
(54) |
Sep
(165) |
Oct
(255) |
Nov
(328) |
Dec
(263) |
2012 |
Jan
(82) |
Feb
(147) |
Mar
(400) |
Apr
(216) |
May
(209) |
Jun
(160) |
Jul
(86) |
Aug
(141) |
Sep
(156) |
Oct
(6) |
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(2) |
2016 |
Jan
|
Feb
(2) |
Mar
(2) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(4) |
Jun
(8) |
Jul
(2) |
Aug
(5) |
Sep
(9) |
Oct
|
Nov
|
Dec
|
From: <par...@us...> - 2012-04-19 18:28:13
|
Revision: 10298 http://octave.svn.sourceforge.net/octave/?rev=10298&view=rev Author: paramaniac Date: 2012-04-19 18:28:07 +0000 (Thu, 19 Apr 2012) Log Message: ----------- control-devel: revert minor changes Modified Paths: -------------- trunk/octave-forge/extra/control-devel/devel/Destillation.m trunk/octave-forge/extra/control-devel/devel/PowerPlant.m Modified: trunk/octave-forge/extra/control-devel/devel/Destillation.m =================================================================== --- trunk/octave-forge/extra/control-devel/devel/Destillation.m 2012-04-19 13:48:22 UTC (rev 10297) +++ trunk/octave-forge/extra/control-devel/devel/Destillation.m 2012-04-19 18:28:07 UTC (rev 10298) @@ -74,8 +74,8 @@ err = norm (Y_dest - y, 1) / norm (Y_dest, 1) figure (1) -plot (t, Y_dest, 'b') -%plot (t, Y_dest, 'b', t, y, 'r') +%plot (t, Y_dest, 'b') +plot (t, Y_dest, 'b', t, y, 'r') legend ('y measured', 'y simulated', 'location', 'southeast') Modified: trunk/octave-forge/extra/control-devel/devel/PowerPlant.m =================================================================== --- trunk/octave-forge/extra/control-devel/devel/PowerPlant.m 2012-04-19 13:48:22 UTC (rev 10297) +++ trunk/octave-forge/extra/control-devel/devel/PowerPlant.m 2012-04-19 18:28:07 UTC (rev 10298) @@ -61,7 +61,7 @@ dat = iddata (Y, U, tsam, 'outname', outname, 'inname', inname) -[sys, x0] = ident (dat, 10, 7) % s=10, n=8 +[sys, x0] = ident (dat, 10, 8) % s=10, n=8 [y, t] = lsim (sys, U, [], x0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <raf...@us...> - 2012-04-19 13:48:33
|
Revision: 10297 http://octave.svn.sourceforge.net/octave/?rev=10297&view=rev Author: rafavzqz Date: 2012-04-19 13:48:22 +0000 (Thu, 19 Apr 2012) Log Message: ----------- Fixed the number of patches Modified Paths: -------------- trunk/octave-forge/extra/nurbs/inst/nrbexport.m Modified: trunk/octave-forge/extra/nurbs/inst/nrbexport.m =================================================================== --- trunk/octave-forge/extra/nurbs/inst/nrbexport.m 2012-04-19 10:29:20 UTC (rev 10296) +++ trunk/octave-forge/extra/nurbs/inst/nrbexport.m 2012-04-19 13:48:22 UTC (rev 10297) @@ -45,7 +45,7 @@ fprintf (fid, '%s\n', ['# ' date]); fprintf (fid, '%s\n', '#'); -fprintf (fid, '%2i', ndim, 1); +fprintf (fid, '%2i', ndim, npatch); fprintf (fid, '\n'); for iptc = 1:npatch fprintf (fid, '%s %i', 'PATCH', iptc); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-19 10:29:32
|
Revision: 10296 http://octave.svn.sourceforge.net/octave/?rev=10296&view=rev Author: carandraug Date: 2012-04-19 10:29:20 +0000 (Thu, 19 Apr 2012) Log Message: ----------- linear-algebra: update COPYING file to say check individual files Modified Paths: -------------- trunk/octave-forge/main/linear-algebra/COPYING Modified: trunk/octave-forge/main/linear-algebra/COPYING =================================================================== --- trunk/octave-forge/main/linear-algebra/COPYING 2012-04-19 10:14:15 UTC (rev 10295) +++ trunk/octave-forge/main/linear-algebra/COPYING 2012-04-19 10:29:20 UTC (rev 10296) @@ -1,337 +1 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see <http://www.gnu.org/licenses/>. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. +See individual files for licenses This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-19 10:14:22
|
Revision: 10295 http://octave.svn.sourceforge.net/octave/?rev=10295&view=rev Author: carandraug Date: 2012-04-19 10:14:15 +0000 (Thu, 19 Apr 2012) Log Message: ----------- circulant_eig: set warning of broadcasting in a unwind_protect block Modified Paths: -------------- trunk/octave-forge/main/linear-algebra/inst/circulant_eig.m Modified: trunk/octave-forge/main/linear-algebra/inst/circulant_eig.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/circulant_eig.m 2012-04-19 10:01:50 UTC (rev 10294) +++ trunk/octave-forge/main/linear-algebra/inst/circulant_eig.m 2012-04-19 10:14:15 UTC (rev 10295) @@ -29,23 +29,34 @@ function [a, b] = circulant_eig (v) - warning ("off", "Octave:broadcast"); #the code below uses broadcasting + ## FIXME when warning for broadcastin is turned off by default, this + ## unwind_protect block could be removed - #find the eigenvalues - n = numel(v); - lambda = ones(n, 1); - s = (0:(n-1)); - lambda = sum(v .* exp(-2*pi*i*s'*s/n))'; + ## we are using broadcasting on the code below so we turn off the + ## warnings but will restore to previous state at the end + bc_warn = warning ("query", "Octave:broadcast"); + unwind_protect + warning ("off", "Octave:broadcast"); - if nargout < 2 - a = lambda; - return - endif + #find the eigenvalues + n = numel(v); + lambda = ones(n, 1); + s = (0:(n-1)); + lambda = sum(v .* exp(-2*pi*i*s'*s/n))'; - #find the eigenvectors (which in fact do not depend on v) - a = exp(-2*i*pi*s'*s/n) / sqrt(n); - b = diag(lambda); + if nargout < 2 + a = lambda; + return + endif + #find the eigenvectors (which in fact do not depend on v) + a = exp(-2*i*pi*s'*s/n) / sqrt(n); + b = diag(lambda); + unwind_protect_cleanup + ## restore broadcats warning status + warning (bc_warn.state, "Octave:broadcast"); + end_unwind_protect + endfunction %!shared v,C,vs,lambda This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-19 10:02:02
|
Revision: 10294 http://octave.svn.sourceforge.net/octave/?rev=10294&view=rev Author: carandraug Date: 2012-04-19 10:01:50 +0000 (Thu, 19 Apr 2012) Log Message: ----------- linear-algebra: update license to GPLv3+ Modified Paths: -------------- trunk/octave-forge/main/linear-algebra/DESCRIPTION trunk/octave-forge/main/linear-algebra/inst/cartprod.m trunk/octave-forge/main/linear-algebra/inst/circulant_eig.m trunk/octave-forge/main/linear-algebra/inst/circulant_inv.m trunk/octave-forge/main/linear-algebra/inst/circulant_make_matrix.m trunk/octave-forge/main/linear-algebra/inst/circulant_matrix_vector_product.m trunk/octave-forge/main/linear-algebra/inst/cod.m trunk/octave-forge/main/linear-algebra/inst/condeig.m trunk/octave-forge/main/linear-algebra/inst/funm.m trunk/octave-forge/main/linear-algebra/inst/lobpcg.m trunk/octave-forge/main/linear-algebra/inst/ndcovlt.m trunk/octave-forge/main/linear-algebra/inst/rotparams.m trunk/octave-forge/main/linear-algebra/inst/rotv.m trunk/octave-forge/main/linear-algebra/inst/smwsolve.m trunk/octave-forge/main/linear-algebra/inst/thfm.m trunk/octave-forge/main/linear-algebra/src/CmplxGSVD.cc trunk/octave-forge/main/linear-algebra/src/CmplxGSVD.h trunk/octave-forge/main/linear-algebra/src/dbleGSVD.cc trunk/octave-forge/main/linear-algebra/src/dbleGSVD.h trunk/octave-forge/main/linear-algebra/src/gsvd.cc trunk/octave-forge/main/linear-algebra/src/pgmres.cc Modified: trunk/octave-forge/main/linear-algebra/DESCRIPTION =================================================================== --- trunk/octave-forge/main/linear-algebra/DESCRIPTION 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/DESCRIPTION 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,12 +1,12 @@ -Name: Linear-Algebra +Name: Linear-algebra Version: 2.1.0 Date: 2011-11-06 -Author: Various Authors -Maintainer: The Octave Community -Title: Linear Algebra. +Author: various authors +Maintainer: Octave-Forge community <oct...@li...> +Title: Linear algebra. Description: Additional linear algebra code, including general SVD and matrix functions. -Categories: Linear-Algebra +Categories: Linear algebra Depends: octave (>= 3.2.3), general (>= 1.3.0) Autoload: no -License: GPL version 3 or later +License: GPLv3+, LGPLv3+ Url: http://octave.sf.net Modified: trunk/octave-forge/main/linear-algebra/inst/cartprod.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/cartprod.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/cartprod.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,21 +1,21 @@ ## Copyright (C) 2008 Muthiah Annamalai <mut...@ut...> ## Copyright (C) 2010 VZLU Prague -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or -## (at your option) any later version. ## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## You should have received a copy of the GNU General Public License -## along with this program; If not, see <http://www.gnu.org/licenses/>. +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. +## +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} {} cartprod (@var{varargin} ) +## @deftypefn {Function File} {} cartprod (@var{varargin}) ## ## Computes the cartesian product of given column vectors ( row vectors ). ## The vector elements are assumend to be numbers. @@ -56,6 +56,4 @@ endfunction -%! %!assert(cartprod(1:2,0:1),[1 0; 2 0; 1 1; 2 1]) -%! Modified: trunk/octave-forge/main/linear-algebra/inst/circulant_eig.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/circulant_eig.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/circulant_eig.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,21 +1,21 @@ -## Copyright (C) 2012 Nir Krakauer +## Copyright (C) 2012 Nir Krakauer <nkr...@cc...> ## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. ## -## You should have received a copy of the GNU General Public License -## along with this program; If not, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn{Function File}{[@var{lambda}] =} circulant_eig (@var{v}) -## @deftypefnx{Function File}{[@var{vs}, @var{lambda}] =} circulant_eig (@var{v}) +## @deftypefn{Function File} {@var{lambda} =} circulant_eig (@var{v}) +## @deftypefnx{Function File} {[@var{vs}, @var{lambda}] =} circulant_eig (@var{v}) ## ## Fast, compact calculation of eigenvalues and eigenvectors of a circulant matrix@* ## Given an @var{n}*1 vector @var{v}, return the eigenvalues @var{lambda} and optionally eigenvectors @var{vs} of the @var{n}*@var{n} circulant matrix @var{C} that has @var{v} as its first column @@ -24,35 +24,30 @@ ## ## Reference: Robert M. Gray, Toeplitz and Circulant Matrices: A Review, Now Publishers, http://ee.stanford.edu/~gray/toeplitz.pdf, Chapter 3 ## -## @end deftypefn ## @seealso{circulant_make_matrix, circulant_matrix_vector_product, circulant_inv} +## @end deftypefn -## Author: Nir Krakauer <nkr...@cc...> +function [a, b] = circulant_eig (v) -function [a, b] = circulant_eig(v) + warning ("off", "Octave:broadcast"); #the code below uses broadcasting + #find the eigenvalues + n = numel(v); + lambda = ones(n, 1); + s = (0:(n-1)); + lambda = sum(v .* exp(-2*pi*i*s'*s/n))'; -warning ("off", "Octave:broadcast"); #the code below uses broadcasting + if nargout < 2 + a = lambda; + return + endif -#find the eigenvalues -n = numel(v); -lambda = ones(n, 1); -s = (0:(n-1)); -lambda = sum(v .* exp(-2*pi*i*s'*s/n))'; + #find the eigenvectors (which in fact do not depend on v) + a = exp(-2*i*pi*s'*s/n) / sqrt(n); + b = diag(lambda); -if nargout < 2 - a = lambda; - return -endif - -#find the eigenvectors (which in fact do not depend on v) -a = exp(-2*i*pi*s'*s/n) / sqrt(n); -b = diag(lambda); - - endfunction - %!shared v,C,vs,lambda %! v = [1 2 3]'; %! C = circulant_make_matrix(v); Modified: trunk/octave-forge/main/linear-algebra/inst/circulant_inv.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/circulant_inv.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/circulant_inv.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,20 +1,20 @@ -## Copyright (C) 2012 Nir Krakauer +## Copyright (C) 2012 Nir Krakauer <nkr...@cc...> ## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. ## -## You should have received a copy of the GNU General Public License -## along with this program; If not, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn{Function File}{[@var{c}] =} circulant_inv (@var{v}) +## @deftypefn{Function File} {@var{c} =} circulant_inv (@var{v}) ## ## Fast, compact calculation of inverse of a circulant matrix@* ## Given an @var{n}*1 vector @var{v}, return the inverse @var{c} of the @var{n}*@var{n} circulant matrix @var{C} that has @var{v} as its first column @@ -26,24 +26,19 @@ ## ## Reference: Robert M. Gray, Toeplitz and Circulant Matrices: A Review, Now Publishers, http://ee.stanford.edu/~gray/toeplitz.pdf, Chapter 3 ## -## @end deftypefn ## @seealso{circulant_make_matrix, circulant_matrix_vector_product, circulant_eig} +## @end deftypefn -## Author: Nir Krakauer <nkr...@cc...> - function c = circulant_inv(v) + ## Find the eigenvalues and eigenvectors + [vs, lambda] = circulant_eig(v); -## Find the eigenvalues and eigenvectors -[vs, lambda] = circulant_eig(v); + ## Find the first column of the inverse + c = vs * diag(1 ./ diag(lambda)) * conj(vs(:, 1)); -## Find the first column of the inverse -c = vs * diag(1 ./ diag(lambda)) * conj(vs(:, 1)); - - endfunction - %!shared v %! v = [1 2 3]'; %!assert (make_circulant_matrix(circulant_inv(v)), inv(make_circulant_matrix(v)), 10*eps); Modified: trunk/octave-forge/main/linear-algebra/inst/circulant_make_matrix.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/circulant_make_matrix.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/circulant_make_matrix.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,20 +1,20 @@ -## Copyright (C) 2012 Nir Krakauer +## Copyright (C) 2012 Nir Krakauer <nkr...@cc...> ## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. ## -## You should have received a copy of the GNU General Public License -## along with this program; If not, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn{Function File}{[@var{C}] =} circulant_make_matrix(@var{v}) +## @deftypefn{Function File} {@var{C} =} circulant_make_matrix (@var{v}) ## ## Produce a full circulant matrix given the first column@* ## Given an @var{n}*1 vector @var{v}, returns the @var{n}*@var{n} circulant matrix @var{C} where @var{v} is the left column and all other columns are downshifted versions of @var{v} @@ -23,22 +23,17 @@ ## ## Reference: Gene H. Golub and Charles F. Van Loan, Matrix Computations, 3rd Ed., Section 4.7.7 ## -## @end deftypefn ## @seealso{circulant_matrix_vector_product, circulant_eig, circulant_inv} +## @end deftypefn -## Author: Nir Krakauer <nkr...@cc...> - - function C = circulant_make_matrix(v) -n = numel(v); + n = numel(v); + C = ones(n, n); + for i = 1:n + C(:, i) = v([(end-i+2):end 1:(end-i+1)]); #or circshift(v, i-1) + endfor -C = ones(n, n); - -for i = 1:n - C(:, i) = v([(end-i+2):end 1:(end-i+1)]); #or circshift(v, i-1) -endfor - endfunction %!shared v,C Modified: trunk/octave-forge/main/linear-algebra/inst/circulant_matrix_vector_product.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/circulant_matrix_vector_product.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/circulant_matrix_vector_product.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,48 +1,42 @@ -## Copyright (C) 2012 Nir Krakauer +## Copyright (C) 2012 Nir Krakauer <nkr...@cc...> ## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. ## -## You should have received a copy of the GNU General Public License -## along with this program; If not, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn{Function File}{[@var{y}] =} circulant_matrix_vector_product(@var{v}, @var{x}) +## @deftypefn{Function File} {@var{y} =} circulant_matrix_vector_product (@var{v}, @var{x}) ## ## Fast, compact calculation of the product of a circulant matrix with a vector@* ## Given @var{n}*1 vectors @var{v} and @var{x}, return the matrix-vector product @var{y} = @var{C}@var{x}, where @var{C} is the @var{n}*@var{n} circulant matrix that has @var{v} as its first column ## ## Theoretically the same as @code{make_circulant_matrix(x) * v}, but does not form @var{C} explicitly; uses the discrete Fourier transform ## -## Because of roundoff, the returned @var{y} may have a small imaginary component even if @var{v} and @var{x} are real (use @code{real(y)} to remedy this) +## Because of roundoff, the returned @var{y} may have a small imaginary component even if @var{v} and @var{x} are real (use @code{real(y)} to remedy this) ## ## Reference: Gene H. Golub and Charles F. Van Loan, Matrix Computations, 3rd Ed., Section 4.7.7 ## -## @end deftypefn ## @seealso{circulant_make_matrix, circulant_eig, circulant_inv} +## @end deftypefn -## Author: Nir Krakauer <nkr...@cc...> +function y = circulant_matrix_vector_product (v, x) -function y = circulant_matrix_vector_product(v, x) + xf = fft(x); + vf = fft(v); + z = vf .* xf; + y = ifft(z); - -xf = fft(x); -vf = fft(v); -z = vf .* xf; -y = ifft(z); - - endfunction - - %!shared v,x %! v = [1 2 3]'; x = [2 5 6]'; %!assert (circulant_matrix_vector_product(v, x), circulant_make_matrix(v)*x, eps); Modified: trunk/octave-forge/main/linear-algebra/inst/cod.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/cod.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/cod.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,20 +1,17 @@ ## Copyright (C) 2009 VZLU Prague, a.s., Czech Republic ## -## Author: Jaroslav Hajek <hi...@gm...> -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. +## +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. +## +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn{Function File} {[@var{q}, @var{r}, @var{z}] =} cod (@var{a}) @@ -36,11 +33,13 @@ ## If a second argument of '0' is given, an economy-sized factorization is returned ## so that @var{r} is K-by-K. ## -## NOTE: This is currently implemented by double QR factorization plus some +## @emph{NOTE}: This is currently implemented by double QR factorization plus some ## tricky manipulations, and is not as efficient as using xRZTZF from LAPACK. ## @seealso{qr} ## @end deftypefn +## Author: Jaroslav Hajek <hi...@gm...> + function [q, r, z, p] = cod (a, varargin) if (nargin < 1 || nargin > 2 || nargout > 4 || ! ismatrix (a)) Modified: trunk/octave-forge/main/linear-algebra/inst/condeig.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/condeig.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/condeig.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,17 +1,17 @@ ## Copyright (C) 2006, 2007 Arno Onken <as...@as...> ## -## This program is free software: you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, either version 3 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. ## -## You should have received a copy of the GNU General Public License -## along with this program. If not, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {Function File} {@var{c} =} condeig (@var{a}) Modified: trunk/octave-forge/main/linear-algebra/inst/funm.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/funm.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/funm.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,19 +1,18 @@ ## Copyright (C) 2000, 2011 P.R. Nienhuis <prn...@us...> ## Copyright (C) 2001 Paul Kienzle <pki...@us...> ## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## This program is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. ## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {Function File} {@var{B} =} funm (@var{A}, @var{F}) @@ -49,17 +48,6 @@ ## @seealso{thfm, expm, logm, sqrtm} ## @end deftypefn -## Author: P.R. Nienhuis <prn...@us...> (somewhere in 2000) -## Additions by P. Kienzle, ......... -## 2001-03-01 Paul Kienzle -## * Many code improvements -## 2011-03-27 Philip Nienhuis -## * Function handles -## * Texinfo header -## * Fallback to thfm for trig & hyperb funcs to avoid diagonalization -## 2011-07-29 Philip Nienhuis -## * Layout, cleanup (tabs, alignment, ...) - function B = funm (A, name) persistent thfuncs = {"cos", "sin", "tan", "sec", "csc", "cot", ... Modified: trunk/octave-forge/main/linear-algebra/inst/lobpcg.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/lobpcg.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/lobpcg.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,18 +1,17 @@ ## Copyright (C) 2000-2011 A.V. Knyazev <And...@uc...> ## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU Lesser General Public License as published by the Free +## Software Foundation; either version 3 of the License, or (at your option) any +## later version. ## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License +## for more details. ## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +## You should have received a copy of the GNU Lesser General Public License +## along with this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {Function File} {[@var{blockVectorX}, @var{lambda}] =} lobpcg (@var{blockVectorX}, @var{operatorA}) @@ -251,11 +250,6 @@ ## package and is directly available, e.g., in PETSc and HYPRE. ## @end deftypefn -% License: GNU LGPL ver 2.1 or above -% Copyright (c) 2000-2011 A.V. Knyazev, And...@uc... -% $Revision: 4.13 $ $Date: 16-Oct-2011 -% Tested in MATLAB 6.5-7.13 and Octave 3.2.3-3.4.2. - function [blockVectorX,lambda,varargout] = lobpcg(blockVectorX,operatorA,varargin) %Begin Modified: trunk/octave-forge/main/linear-algebra/inst/ndcovlt.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/ndcovlt.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/ndcovlt.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,20 +1,17 @@ ## Copyright (C) 2010 VZLU Prague, a.s., Czech Republic ## -## Author: Jaroslav Hajek <hi...@gm...> -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. +## +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. +## +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn{Function File} {@var{y} =} ndcovlt (@var{x}, @var{t1}, @var{t2}, @dots{}) @@ -44,6 +41,8 @@ ## ## @end deftypefn +## Author: Jaroslav Hajek <hi...@gm...> + function y = ndcovlt (x, varargin) nd = max (ndims (x), nargin - 1); varargin = resize (varargin, 1, nd); Modified: trunk/octave-forge/main/linear-algebra/inst/rotparams.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/rotparams.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/rotparams.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,25 +1,24 @@ ## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## -## This program is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by the -## Free Software Foundation; either version 2, or (at your option) any -## later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## This is distributed in the hope that it will be useful, but WITHOUT +## This program is distributed in the hope that it will be useful, but WITHOUT ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -## for more details. +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. ## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn{Function File} {@var{[vstacked, astacked]} = } rotparams ( rstacked ) +## @deftypefn{Function File} {[@var{vstacked}, @var{astacked}] =} rotparams (@var{rstacked}) ## @cindex ## The function w = rotparams (r) - Inverse to rotv(). ## Using, @var{w} = rotparams(@var{r}) is such that -## rotv(w)*r' == eye(3). +## rotv(w)*r' == eye(3). ## ## If used as, [v,a]=rotparams(r) , idem, with v (1 x 3) s.t. w == a*v. ## Modified: trunk/octave-forge/main/linear-algebra/inst/rotv.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/rotv.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/rotv.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,18 +1,17 @@ ## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## -## This program is free software; you can redistribute it and/or modify it -## under the terms of the GNU General Public License as published by the -## Free Software Foundation; either version 2, or (at your option) any -## later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## This is distributed in the hope that it will be useful, but WITHOUT +## This program is distributed in the hope that it will be useful, but WITHOUT ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -## for more details. +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. ## -## You should have received a copy of the GNU General Public License -## along with this program; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn{Function File} {@var{r} = } rotv ( v, ang ) Modified: trunk/octave-forge/main/linear-algebra/inst/smwsolve.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/smwsolve.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/smwsolve.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,20 +1,17 @@ ## Copyright (C) 2009 VZLU Prague, a.s., Czech Republic ## -## Author: Jaroslav Hajek <hi...@gm...> -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. +## +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. +## +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn{Function File} {@var{x} =} smwsolve (@var{a}, @var{u}, @var{v}, @var{b}) @@ -29,6 +26,8 @@ ## @var{solver} that performs the left division operation. ## @end deftypefn +## Author: Jaroslav Hajek <hi...@gm...> + function x = smwsolve (a, u, v, b) if (nargin != 4) Modified: trunk/octave-forge/main/linear-algebra/inst/thfm.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/thfm.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/thfm.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -3,19 +3,18 @@ ## Copyright (C) 2011 Philip Nienhuis <pr....@hc...> ## Copyright (C) 2011 Carnë Draug <car...@gm...> ## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 3 of the License, or -## (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## This program is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. ## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn{Function File} {@var{y} =} thfm (@var{x}, @var{mode}) Modified: trunk/octave-forge/main/linear-algebra/src/CmplxGSVD.cc =================================================================== --- trunk/octave-forge/main/linear-algebra/src/CmplxGSVD.cc 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/src/CmplxGSVD.cc 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,23 +1,19 @@ -/* +// Copyright (C) 1996, 1997 John W. Eaton +// Copyright (C) 2006 Pascal Dupuis <Pas...@uc...> +// +// This program is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation; either version 3 of the License, or (at your option) any later +// version. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// this program; if not, see <http://www.gnu.org/licenses/>. -Copyright (C) 1996, 1997 John W. Eaton -Copyright (C) 2006 Pascal Dupuis -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -This software is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with this software; see the file COPYING. If not, see -<http://www.gnu.org/licenses/>. - -*/ - #ifdef HAVE_CONFIG_H #include <config.h> #endif @@ -290,9 +286,3 @@ } return info; } - -/* -;;; Local Variables: *** -;;; mode: C++ *** -;;; End: *** -*/ Modified: trunk/octave-forge/main/linear-algebra/src/CmplxGSVD.h =================================================================== --- trunk/octave-forge/main/linear-algebra/src/CmplxGSVD.h 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/src/CmplxGSVD.h 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,24 +1,19 @@ -/* +// Copyright (C) 1996, 1997 John W. Eaton +// Copyright (C) 2006 Pascal Dupuis <Pas...@uc...> +// +// This program is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation; either version 3 of the License, or (at your option) any later +// version. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// this program; if not, see <http://www.gnu.org/licenses/>. -Copyright (C) 1996, 1997 John W. Eaton -Copyright (C) 2006 Pascal Dupuis - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -This software is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with this software; see the file COPYING. If not, see -<http://www.gnu.org/licenses/>. - -*/ - #if !defined (octave_ComplexGSVD_h) #define octave_ComplexGSVD_h 1 @@ -95,9 +90,3 @@ }; #endif - -/* -;;; Local Variables: *** -;;; mode: C++ *** -;;; End: *** -*/ Modified: trunk/octave-forge/main/linear-algebra/src/dbleGSVD.cc =================================================================== --- trunk/octave-forge/main/linear-algebra/src/dbleGSVD.cc 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/src/dbleGSVD.cc 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,23 +1,19 @@ -/* +// Copyright (C) 1996, 1997 John W. Eaton +// Copyright (C) 2006 Pascal Dupuis <Pas...@uc...> +// +// This program is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation; either version 3 of the License, or (at your option) any later +// version. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// this program; if not, see <http://www.gnu.org/licenses/>. -Copyright (C) 1996, 1997 John W. Eaton -Copyright (C) 2006 Pascal Dupuis -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -This software is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with this software; see the file COPYING. If not, see -<http://www.gnu.org/licenses/>. - -*/ - #ifdef HAVE_CONFIG_H #include <config.h> #endif @@ -296,9 +292,3 @@ return os; } - -/* -;;; Local Variables: *** -;;; mode: C++ *** -;;; End: *** -*/ Modified: trunk/octave-forge/main/linear-algebra/src/dbleGSVD.h =================================================================== --- trunk/octave-forge/main/linear-algebra/src/dbleGSVD.h 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/src/dbleGSVD.h 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,24 +1,19 @@ -/* +// Copyright (C) 1996, 1997 John W. Eaton +// Copyright (C) 2006 Pascal Dupuis <Pas...@uc...> +// +// This program is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation; either version 3 of the License, or (at your option) any later +// version. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// this program; if not, see <http://www.gnu.org/licenses/>. -Copyright (C) 1996, 1997 John W. Eaton -Copyright (C) 2006 Pascal Dupuis - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -This software is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with this software; see the file COPYING. If not, see -<http://www.gnu.org/licenses/>. - -*/ - #if !defined (octave_GSVD_h) #define octave_GSVD_h 1 @@ -94,9 +89,3 @@ }; #endif - -/* -;;; Local Variables: *** -;;; mode: C++ *** -;;; End: *** -*/ Modified: trunk/octave-forge/main/linear-algebra/src/gsvd.cc =================================================================== --- trunk/octave-forge/main/linear-algebra/src/gsvd.cc 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/src/gsvd.cc 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,24 +1,19 @@ -/* +// Copyright (C) 1996, 1997 John W. Eaton +// Copyright (C) 2006, 2010 Pascal Dupuis <Pas...@uc...> +// +// This program is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation; either version 3 of the License, or (at your option) any later +// version. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// this program; if not, see <http://www.gnu.org/licenses/>. -Copyright (C) 1996, 1997 John W. Eaton -Copyright (C) 2006, 2010 Pascal Dupuis <Pas...@uc...> - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -This software is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with this software; see the file COPYING. If not, see -<http://www.gnu.org/licenses/>. - -*/ - #ifdef HAVE_CONFIG_H #include <config.h> #endif @@ -488,9 +483,3 @@ %!assert(norm((V'*B*X)-D2*[zeros(4, 1) R]) <= 1e-6) */ - -/* -;;; Local Variables: *** -;;; mode: C++ *** -;;; End: *** -*/ Modified: trunk/octave-forge/main/linear-algebra/src/pgmres.cc =================================================================== --- trunk/octave-forge/main/linear-algebra/src/pgmres.cc 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/src/pgmres.cc 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,24 +1,17 @@ -/* - Copyright (C) 2009 Carlo de Falco - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - Author: Carlo de Falco <cdf _AT_ users _DOT_ sourceforge _DOT_ net> - Created: 2009-06-01 - -*/ +// Copyright (C) 2009 Carlo de Falco <cd...@us...> +// +// This program is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free Software +// Foundation; either version 3 of the License, or (at your option) any later +// version. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// this program; if not, see <http://www.gnu.org/licenses/>. #include <octave/oct.h> #include <octave/parse.h> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2012-04-19 09:44:44
|
Revision: 10293 http://octave.svn.sourceforge.net/octave/?rev=10293&view=rev Author: jpicarbajal Date: 2012-04-19 09:44:33 +0000 (Thu, 19 Apr 2012) Log Message: ----------- geometry: Adding solution to the belt problem in 2D. Modified Paths: -------------- trunk/octave-forge/main/geometry/INDEX trunk/octave-forge/main/geometry/NEWS Added Paths: ----------- trunk/octave-forge/main/geometry/inst/geom2d/beltproblem.m Modified: trunk/octave-forge/main/geometry/INDEX =================================================================== --- trunk/octave-forge/main/geometry/INDEX 2012-04-19 09:13:52 UTC (rev 10292) +++ trunk/octave-forge/main/geometry/INDEX 2012-04-19 09:44:33 UTC (rev 10293) @@ -134,6 +134,7 @@ curveval curve2polyline 2D Others + beltproblem bisector crackPattern2 crackPattern Modified: trunk/octave-forge/main/geometry/NEWS =================================================================== --- trunk/octave-forge/main/geometry/NEWS 2012-04-19 09:13:52 UTC (rev 10292) +++ trunk/octave-forge/main/geometry/NEWS 2012-04-19 09:44:33 UTC (rev 10293) @@ -5,6 +5,9 @@ =============================================================================== * Added functions: + - beltproblem.m : Finds the four lines tangent to two circles with given centers and + radii. This is the solution to the belt problem in 2D. + - curveval.m: Evaluates a polynomial curve defined as a 2-by-N matrix. - curve2polyline.m: Converts a polynomial curve into a polyline by the adaptive Added: trunk/octave-forge/main/geometry/inst/geom2d/beltproblem.m =================================================================== --- trunk/octave-forge/main/geometry/inst/geom2d/beltproblem.m (rev 0) +++ trunk/octave-forge/main/geometry/inst/geom2d/beltproblem.m 2012-04-19 09:44:33 UTC (rev 10293) @@ -0,0 +1,136 @@ +%% Copyright (c) 2012 Juan Pablo Carbajal <car...@if...> +%% +%% This program is free software: you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by +%% the Free Software Foundation, either version 3 of the License, or +%% any later version. +%% +%% This program is distributed in the hope that it will be useful, +%% but WITHOUT ANY WARRANTY; without even the implied warranty of +%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +%% GNU General Public License for more details. +%% +%% You should have received a copy of the GNU General Public License +%% along with this program. If not, see <http://www.gnu.org/licenses/>. + +%% -*- texinfo -*- +%% @deftypefn {Function File} {[@var{tangent},@var{inner}] = } beltproblem (@var{c}, @var{r}) +%% Finds the four lines tangent to two circles with given centers and radii. +%% +%% The function solves the belt problem in 2D for circles with center @var{c} and +%% radii @var{r}. +%% +%% @strong{INPUT} +%% @table @var +%% @item c +%% 2-by-2 matrix containig coordinates of the centers of the circles; one row per circle. +%% @item r +%% 2-by-1 vector with the radii of the circles. +%%@end table +%% +%% @strong{OUPUT} +%% @table @var +%% @item tangent +%% 4-by-4 matrix with the points of tangency. Each row describes a segment(edge). +%% @item inner +%% 4-by-2 vector with the point of intersection of the inner tangents (crossed belts) +%% with the segment that joins the centers of the two circles. If +%% the i-th edge is not an inner tangent then @code{inner(i,:)=[NaN,NaN]}. +%% @end table +%% +%% Example: +%% +%% @example +%% c = [0 0;1 3]; +%% r = [1 0.5]; +%% [T inner] = beltproblem(c,r) +%% @result{} T = +%% -0.68516 0.72839 1.34258 2.63581 +%% 0.98516 0.17161 0.50742 2.91419 +%% 0.98675 -0.16225 1.49338 2.91888 +%% -0.88675 0.46225 0.55663 3.23112 +%% +%% @result{} inner = +%% 0.66667 2.00000 +%% 0.66667 2.00000 +%% NaN NaN +%% NaN NaN +%% +%% @end example +%% +%% @seealso{edges2d} +%% @end deftypefn + +function [edgeTan inner] = beltproblem(c,r) + + x0 = [c(1,1) c(1,2) c(2,1) c(2,2)]; + r0 = r([1 1 2 2]); + + middleEdge = createEdge(c(1,:),c(2,:)); + + ind0 = [1 0 1 0; 0 1 1 0; 1 1 1 0; -1 0 1 0; 0 -1 1 0; -1 -1 1 0;... + 1 0 0 1; 0 1 0 1; 1 1 0 1; -1 0 0 1; 0 -1 0 1; -1 -1 0 1;... + 1 0 1 1; 0 1 1 1; 1 1 1 1; -1 0 1 1; 0 -1 1 1; -1 -1 1 1;... + 1 0 -1 0; 0 1 -1 0; 1 1 -1 0; -1 0 -1 0; 0 -1 -1 0; -1 -1 -1 0;... + 1 0 0 -1; 0 1 0 -1; 1 1 0 -1; -1 0 0 -1; 0 -1 0 -1; -1 -1 0 -1;... + 1 0 -1 -1; 0 1 -1 -1; 1 1 -1 -1; -1 0 -1 -1; 0 -1 -1 -1; -1 -1 -1 -1]; + nInit = size(ind0,1); + ir = randperm(nInit); + edgeTan = zeros(4,4); + inner = zeros(4,2); + nSol = 0; + i=1; + + %% Solve for 2 different lines + while nSol<4 && i<nInit + ind = find(ind0(ir(i),:)~=0); + x = x0; + x(ind)=x(ind)+r0(ind); + [sol f0 nev]= fsolve(@(x)belt(x,c,r),x); + if nev~=1 + perror('fsolve',nev) + end + + for j=1:4 + notequal(j) = all(abs(edgeTan(j,:)-sol) > 1e-6); + end + if all(notequal) + nSol = nSol+1; + edgeTan(nSol,:) = createEdge(sol(1:2),sol(3:4)); + % Find innerTangent + inner(nSol,:) = intersectEdges(middleEdge,edgeTan(nSol,:)); + end + + i = i+1; + end + +endfunction + +function res = belt(x,c,r) + res = zeros(4,1); + + res(1,1) = (x(3:4) - c(2,1:2))*(x(3:4) - x(1:2))'; + res(2,1) = (x(1:2) - c(1,1:2))*(x(3:4) - x(1:2))'; + res(3,1) = sumsq(x(1:2) - c(1,1:2)) - r(1)^2; + res(4,1) = sumsq(x(3:4) - c(2,1:2)) - r(2)^2; + +end + +%!demo +%! c = [0 0;1 3]; +%! r = [1 0.5]; +%! [T inner] = beltproblem(c,r) +%! +%! figure(1) +%! clf +%! h = drawEdge(T); +%! set(h(find(~isnan(inner(:,1)))),'color','r'); +%! set(h,'linewidth',2); +%! hold on +%! drawCircle([c(1,:) r(1); c(2,:) r(2)],'linewidth',2); +%! axis tight +%! axis equal +%! +%! % ------------------------------------------------------------------- +%! % The circles with the tangents edges are plotted. The solution with +%! % crossed belts (inner tangets) is shown in red. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-19 09:14:02
|
Revision: 10292 http://octave.svn.sourceforge.net/octave/?rev=10292&view=rev Author: carandraug Date: 2012-04-19 09:13:52 +0000 (Thu, 19 Apr 2012) Log Message: ----------- linear-algebra: do not autoload package Modified Paths: -------------- trunk/octave-forge/main/linear-algebra/DESCRIPTION trunk/octave-forge/main/linear-algebra/NEWS Modified: trunk/octave-forge/main/linear-algebra/DESCRIPTION =================================================================== --- trunk/octave-forge/main/linear-algebra/DESCRIPTION 2012-04-19 09:09:29 UTC (rev 10291) +++ trunk/octave-forge/main/linear-algebra/DESCRIPTION 2012-04-19 09:13:52 UTC (rev 10292) @@ -7,6 +7,6 @@ Description: Additional linear algebra code, including general SVD and matrix functions. Categories: Linear-Algebra Depends: octave (>= 3.2.3), general (>= 1.3.0) -Autoload: yes +Autoload: no License: GPL version 3 or later Url: http://octave.sf.net Modified: trunk/octave-forge/main/linear-algebra/NEWS =================================================================== --- trunk/octave-forge/main/linear-algebra/NEWS 2012-04-19 09:09:29 UTC (rev 10291) +++ trunk/octave-forge/main/linear-algebra/NEWS 2012-04-19 09:13:52 UTC (rev 10292) @@ -8,6 +8,8 @@ ** Package is now dependent on general (>= 1.3.0) + ** Package is no longer automatically loaded. + Summary of important user-visible changes for linear-algebra 2.1.0: ------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-19 09:09:40
|
Revision: 10291 http://octave.svn.sourceforge.net/octave/?rev=10291&view=rev Author: carandraug Date: 2012-04-19 09:09:29 +0000 (Thu, 19 Apr 2012) Log Message: ----------- linear-algebra: updated NEWS file Modified Paths: -------------- trunk/octave-forge/main/linear-algebra/NEWS Modified: trunk/octave-forge/main/linear-algebra/NEWS =================================================================== --- trunk/octave-forge/main/linear-algebra/NEWS 2012-04-19 09:00:48 UTC (rev 10290) +++ trunk/octave-forge/main/linear-algebra/NEWS 2012-04-19 09:09:29 UTC (rev 10291) @@ -1,3 +1,13 @@ +Summary of important user-visible changes for linear-algebra 2.2.0: +------------------------------------------------------------------- + + ** The following functions are new in 2.2.0: + + circulant_eig circulant_inv circulant_make_matrix + circulant_matrix_vector_product + + ** Package is now dependent on general (>= 1.3.0) + Summary of important user-visible changes for linear-algebra 2.1.0: ------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2012-04-19 09:00:58
|
Revision: 10290 http://octave.svn.sourceforge.net/octave/?rev=10290&view=rev Author: jpicarbajal Date: 2012-04-19 09:00:48 +0000 (Thu, 19 Apr 2012) Log Message: ----------- optim: Numerical derivatives using the Cauchy integral. Was in worng place Modified Paths: -------------- trunk/octave-forge/main/optim/DESCRIPTION Removed Paths: ------------- trunk/octave-forge/main/optim/cauchy.m Modified: trunk/octave-forge/main/optim/DESCRIPTION =================================================================== --- trunk/octave-forge/main/optim/DESCRIPTION 2012-04-19 08:28:21 UTC (rev 10289) +++ trunk/octave-forge/main/optim/DESCRIPTION 2012-04-19 09:00:48 UTC (rev 10290) @@ -1,6 +1,6 @@ Name: Optim -Version: 1.0.18 -Date: 2011-11-30 +Version: 1.1.0 +Date: 2012-XX-XX Author: various authors Maintainer: Octave-Forge community <oct...@li...> Title: Optimization. Deleted: trunk/octave-forge/main/optim/cauchy.m =================================================================== --- trunk/octave-forge/main/optim/cauchy.m 2012-04-19 08:28:21 UTC (rev 10289) +++ trunk/octave-forge/main/optim/cauchy.m 2012-04-19 09:00:48 UTC (rev 10290) @@ -1,123 +0,0 @@ -## Copyright (C) 2011 Fernando Damian Nieuwveldt <fdn...@gm...> -## 2012 Adapted by Juan Pablo Carbajal <car...@if...> -## -## This program is free software; you can redistribute it and/or -## modify it under the terms of the GNU General Public License -## as published by the Free Software Foundation; either version 3 -## of the License, or (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. - -## -*- texinfo -*- -## @deftypefn {Function File} {} cauchy (@var{N}, @var{r}, @var{x}, @var{f} ) -## Return the Taylor coefficients and numerical differentiation of a function -## @var{f} for the first @var{N-1} coefficients or derivatives using the fft. -## @var{N} is the number of points to evaluate, -## @var{r} is the radius of convergence, needs to be chosen less then the smallest singularity, -## @var{x} is point to evaluate the Taylor expansion or differentiation. For example, -## -## If @var{x} is a scalar, the function @var{f} is evaluated in a row vector -## of length @var{N}. If @var{x} is a column vector, @var{f} is evaluated in a -## matrix of length(x)-by-N elements and must return a matrix of the same size. -## -## @example -## @group -## d = cauchy(16,1.5,0,@(x) exp(x)); -## @result{} d(2) = 1.0000 # first (2-1) derivative of function f (index starts from zero) -## @end group -## @end example -## @end deftypefn - -function deriv = cauchy(N, r, x, f) - - if nargin != 4 - print_usage (); - end - - [nx m] = size (x); - if m > 1 - error('cauchy:InvalidArgument', 'The 3rd argument must be a column vector'); - end - - n = 0:N-1; - th = 2*pi*n/N; - - f_p = f (bsxfun (@plus, x, r * exp (i * th) ) ); - - evalfft = real(fft (f_p, [], 2)); - - deriv = bsxfun (@times, evalfft, 1./(N*(r.^n)).* factorial(n)) ; - -endfunction - -%!demo -%! # Cauchy integral formula: Application to Hermite polynomials -%! # Author: Fernando Damian Nieuwveldt -%! # Edited by: Juan Pablo Carbajal -%! -%! function g = hermite(order,x) -%! -%! ## N should be bigger than order+1 -%! N = 32; -%! r = 0.5; -%! Hnx = @(t) exp ( bsxfun (@minus, kron(t(:).', x(:)) , t(:).'.^2/2) ); -%! Hnxfft = cauchy(N, r, 0, Hnx); -%! g = Hnxfft(:, order+1); -%! -%! endfunction -%! -%! t = linspace(-1,1,30); -%! he2 = hermite(2,t); -%! he2_ = t.^2-1; -%! -%! plot(t,he2,'bo;Contour integral representation;', t,he2_,'r;Exact;'); -%! grid -%! clear all -%! -%! % -------------------------------------------------------------------------- -%! % The plots compares the approximation of the Hermite polynomial using the -%! % Cauchy integral (circles) and the corresposind polynomial H_2(x) = x.^2 - 1. -%! % See http://en.wikipedia.org/wiki/Hermite_polynomials#Contour_integral_representation - -%!demo -%! # Cauchy integral formula: Application to Hermite polynomials -%! # Author: Fernando Damian Nieuwveldt -%! # Edited by: Juan Pablo Carbajal -%! -%! xx = sort (rand (100,1)); -%! yy = sin (3*2*pi*xx); -%! -%! # Exact first derivative derivative -%! diffy = 6*pi*cos (3*2*pi*xx); -%! -%! np = [10 15 30 100]; -%! -%! for i =1:4 -%! idx = sort(randperm (100,np(i))); -%! x = xx(idx); -%! y = yy(idx); -%! -%! p = spline (x,y); -%! yval = ppval (ppder(p),x); -%! # Use the cauchy formula for computing the derivatives -%! deriv = cauchy (fix (np(i)/4), .1, x, @(x) sin (3*2*pi*x)); -%! -%! subplot(2,2,i) -%! h = plot(xx,diffy,'-b;Exact;',... -%! x,yval,'-or;ppder solution;',... -%! x,deriv(:,2),'-og;Cauchy formula;'); -%! set(h(1),'linewidth',2); -%! set(h(2:3),'markersize',3); -%! -%! legend('Location','Northoutside','Orientation','horizontal'); -%! -%! if i!=1 -%! legend('hide','Orientation','horizontal') -%! end -%! end -%! -%! % -------------------------------------------------------------------------- -%! % The plots compares the derivatives calculated with Cauchy and with ppder. -%! % Each subplot shows the results with increasing number of samples. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2012-04-19 08:28:32
|
Revision: 10289 http://octave.svn.sourceforge.net/octave/?rev=10289&view=rev Author: jpicarbajal Date: 2012-04-19 08:28:21 +0000 (Thu, 19 Apr 2012) Log Message: ----------- optim: Numerical derivatives using the Cauchy integral. Was in worng place Added Paths: ----------- trunk/octave-forge/main/optim/inst/cauchy.m Copied: trunk/octave-forge/main/optim/inst/cauchy.m (from rev 10288, trunk/octave-forge/main/optim/cauchy.m) =================================================================== --- trunk/octave-forge/main/optim/inst/cauchy.m (rev 0) +++ trunk/octave-forge/main/optim/inst/cauchy.m 2012-04-19 08:28:21 UTC (rev 10289) @@ -0,0 +1,125 @@ +## Copyright (C) 2011 Fernando Damian Nieuwveldt <fdn...@gm...> +## 2012 Adapted by Juan Pablo Carbajal <car...@if...> +## +## This program is free software; you can redistribute it and/or +## modify it under the terms of the GNU General Public License +## as published by the Free Software Foundation; either version 3 +## of the License, or (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. + +## -*- texinfo -*- +## @deftypefn {Function File} {} cauchy (@var{N}, @var{r}, @var{x}, @var{f} ) +## Return the Taylor coefficients and numerical differentiation of a function +## @var{f} for the first @var{N-1} coefficients or derivatives using the fft. +## @var{N} is the number of points to evaluate, +## @var{r} is the radius of convergence, needs to be chosen less then the smallest singularity, +## @var{x} is point to evaluate the Taylor expansion or differentiation. For example, +## +## If @var{x} is a scalar, the function @var{f} is evaluated in a row vector +## of length @var{N}. If @var{x} is a column vector, @var{f} is evaluated in a +## matrix of length(x)-by-N elements and must return a matrix of the same size. +## +## @example +## @group +## d = cauchy(16,1.5,0,@(x) exp(x)); +## @result{} d(2) = 1.0000 # first (2-1) derivative of function f (index starts from zero) +## @end group +## @end example +## @end deftypefn + +function deriv = cauchy(N, r, x, f) + + if nargin != 4 + print_usage (); + end + + [nx m] = size (x); + if m > 1 + error('cauchy:InvalidArgument', 'The 3rd argument must be a column vector'); + end + + n = 0:N-1; + th = 2*pi*n/N; + + f_p = f (bsxfun (@plus, x, r * exp (i * th) ) ); + + evalfft = real(fft (f_p, [], 2)); + + deriv = bsxfun (@times, evalfft, 1./(N*(r.^n)).* factorial(n)) ; + +endfunction + +function g = hermite(order,x) + ## N should be bigger than order+1 + N = 32; + r = 0.5; + Hnx = @(t) exp ( bsxfun (@minus, kron(t(:).', x(:)) , t(:).'.^2/2) ); + Hnxfft = cauchy(N, r, 0, Hnx); + g = Hnxfft(:, order+1); +endfunction + +%!demo +%! # Cauchy integral formula: Application to Hermite polynomials +%! # Author: Fernando Damian Nieuwveldt +%! # Edited by: Juan Pablo Carbajal +%! +%! Hnx = @(t,x) exp ( bsxfun (@minus, kron(t(:).', x(:)) , t(:).'.^2/2) ); +%! hermite = @(order,x) cauchy(32, 0.5, 0, @(t)Hnx(t,x))(:, order+1); +%! +%! t = linspace(-1,1,30); +%! he2 = hermite(2,t); +%! he2_ = t.^2-1; +%! +%! figure(1) +%! clf +%! plot(t,he2,'bo;Contour integral representation;', t,he2_,'r;Exact;'); +%! grid +%! clear all +%! +%! % -------------------------------------------------------------------------- +%! % The plots compares the approximation of the Hermite polynomial using the +%! % Cauchy integral (circles) and the corresposind polynomial H_2(x) = x.^2 - 1. +%! % See http://en.wikipedia.org/wiki/Hermite_polynomials#Contour_integral_representation + +%!demo +%! # Cauchy integral formula: Application to Hermite polynomials +%! # Author: Fernando Damian Nieuwveldt +%! # Edited by: Juan Pablo Carbajal +%! +%! xx = sort (rand (100,1)); +%! yy = sin (3*2*pi*xx); +%! +%! # Exact first derivative derivative +%! diffy = 6*pi*cos (3*2*pi*xx); +%! +%! np = [10 15 30 100]; +%! +%! for i =1:4 +%! idx = sort(randperm (100,np(i))); +%! x = xx(idx); +%! y = yy(idx); +%! +%! p = spline (x,y); +%! yval = ppval (ppder(p),x); +%! # Use the cauchy formula for computing the derivatives +%! deriv = cauchy (fix (np(i)/4), .1, x, @(x) sin (3*2*pi*x)); +%! +%! subplot(2,2,i) +%! h = plot(xx,diffy,'-b;Exact;',... +%! x,yval,'-or;ppder solution;',... +%! x,deriv(:,2),'-og;Cauchy formula;'); +%! set(h(1),'linewidth',2); +%! set(h(2:3),'markersize',3); +%! +%! legend(h, 'Location','Northoutside','Orientation','horizontal'); +%! if i!=1 +%! legend('hide'); +%! end +%! end +%! +%! % -------------------------------------------------------------------------- +%! % The plots compares the derivatives calculated with Cauchy and with ppder. +%! % Each subplot shows the results with increasing number of samples. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-18 22:59:57
|
Revision: 10288 http://octave.svn.sourceforge.net/octave/?rev=10288&view=rev Author: carandraug Date: 2012-04-18 22:59:50 +0000 (Wed, 18 Apr 2012) Log Message: ----------- special-matrix: added NEWS file Added Paths: ----------- trunk/octave-forge/main/special-matrix/NEWS Added: trunk/octave-forge/main/special-matrix/NEWS =================================================================== --- trunk/octave-forge/main/special-matrix/NEWS (rev 0) +++ trunk/octave-forge/main/special-matrix/NEWS 2012-04-18 22:59:50 UTC (rev 10288) @@ -0,0 +1,8 @@ +Summary of important user-visible changes for special-matrix 1.1.0: +------------------------------------------------------------------- + + ** The following function is new: + + arecibo + + ** Package is no longer automatically loaded. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-18 22:57:52
|
Revision: 10287 http://octave.svn.sourceforge.net/octave/?rev=10287&view=rev Author: carandraug Date: 2012-04-18 22:57:46 +0000 (Wed, 18 Apr 2012) Log Message: ----------- special-matrix: do not autoload package Modified Paths: -------------- trunk/octave-forge/main/special-matrix/DESCRIPTION Modified: trunk/octave-forge/main/special-matrix/DESCRIPTION =================================================================== --- trunk/octave-forge/main/special-matrix/DESCRIPTION 2012-04-18 22:56:35 UTC (rev 10286) +++ trunk/octave-forge/main/special-matrix/DESCRIPTION 2012-04-18 22:57:46 UTC (rev 10287) @@ -7,6 +7,6 @@ Description: Additional Special Matrices for Octave. Categories: Special Matrices Depends: octave (>= 2.9.7) -Autoload: yes +Autoload: no License: public domain Url: http://octave.sf.net This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-18 22:56:41
|
Revision: 10286 http://octave.svn.sourceforge.net/octave/?rev=10286&view=rev Author: carandraug Date: 2012-04-18 22:56:35 +0000 (Wed, 18 Apr 2012) Log Message: ----------- special-matrix: add license (public domain) to missing files Modified Paths: -------------- trunk/octave-forge/main/special-matrix/DESCRIPTION trunk/octave-forge/main/special-matrix/inst/arecibo.m trunk/octave-forge/main/special-matrix/inst/lauchli.m Modified: trunk/octave-forge/main/special-matrix/DESCRIPTION =================================================================== --- trunk/octave-forge/main/special-matrix/DESCRIPTION 2012-04-18 21:32:14 UTC (rev 10285) +++ trunk/octave-forge/main/special-matrix/DESCRIPTION 2012-04-18 22:56:35 UTC (rev 10286) @@ -2,11 +2,11 @@ Version: 1.0.7 Date: 2009-05-06 Author: Paul Kienzle <pki...@us...> -Maintainer: Paul Kienzle <pki...@us...> +Maintainer: Octave-Forge community <oct...@li...> Title: Special Matrices Description: Additional Special Matrices for Octave. Categories: Special Matrices Depends: octave (>= 2.9.7) Autoload: yes -License: Public domain +License: public domain Url: http://octave.sf.net Modified: trunk/octave-forge/main/special-matrix/inst/arecibo.m =================================================================== --- trunk/octave-forge/main/special-matrix/inst/arecibo.m 2012-04-18 21:32:14 UTC (rev 10285) +++ trunk/octave-forge/main/special-matrix/inst/arecibo.m 2012-04-18 22:56:35 UTC (rev 10286) @@ -1,3 +1,6 @@ +## Author: Jaroslav Hajek <hi...@gm...> +## This program is granted to the public domain. + ## -*- texinfo -*- ## @deftypefn {Function File} {@var{a} =} arecibo () ## Returns the 73x23 logical matrix corresponding to the Arecibo message. Modified: trunk/octave-forge/main/special-matrix/inst/lauchli.m =================================================================== --- trunk/octave-forge/main/special-matrix/inst/lauchli.m 2012-04-18 21:32:14 UTC (rev 10285) +++ trunk/octave-forge/main/special-matrix/inst/lauchli.m 2012-04-18 22:56:35 UTC (rev 10286) @@ -1,5 +1,5 @@ -## Copyright (C) Paul Kienzle <pki...@us...> -## This program is in the public domain +## Author: Paul Kienzle <pki...@us...> +## This program is granted to the public domain. ## -*- texinfo -*- ## @deftypefn {Function File} {@var{a}} = lauchli (@var{n}) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-18 21:32:20
|
Revision: 10285 http://octave.svn.sourceforge.net/octave/?rev=10285&view=rev Author: carandraug Date: 2012-04-18 21:32:14 +0000 (Wed, 18 Apr 2012) Log Message: ----------- time: needs at least one file, even if empty, for the package to install. Added Paths: ----------- trunk/octave-forge/main/time/inst/dummy Added: trunk/octave-forge/main/time/inst/dummy =================================================================== --- trunk/octave-forge/main/time/inst/dummy (rev 0) +++ trunk/octave-forge/main/time/inst/dummy 2012-04-18 21:32:14 UTC (rev 10285) @@ -0,0 +1,2 @@ +## pkg install does not allow dummy packages (without files). This ensures +## that the package is installed without polluting the user's namespace This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-18 21:29:15
|
Revision: 10284 http://octave.svn.sourceforge.net/octave/?rev=10284&view=rev Author: carandraug Date: 2012-04-18 21:29:05 +0000 (Wed, 18 Apr 2012) Log Message: ----------- time: new package release Modified Paths: -------------- trunk/octave-forge/main/time/DESCRIPTION Modified: trunk/octave-forge/main/time/DESCRIPTION =================================================================== --- trunk/octave-forge/main/time/DESCRIPTION 2012-04-18 21:28:42 UTC (rev 10283) +++ trunk/octave-forge/main/time/DESCRIPTION 2012-04-18 21:29:05 UTC (rev 10284) @@ -1,6 +1,6 @@ Name: time -Version: 1.0.9 -Date: 2009-05-03 +Version: 2.0.0 +Date: 2012-04-18 Author: Bill Denney <bi...@de...> Maintainer: Octave-Forge community <oct...@li...> Title: Time and Dates This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-18 21:28:53
|
Revision: 10283 http://octave.svn.sourceforge.net/octave/?rev=10283&view=rev Author: carandraug Date: 2012-04-18 21:28:42 +0000 (Wed, 18 Apr 2012) Log Message: ----------- financial: new package release Modified Paths: -------------- trunk/octave-forge/main/financial/DESCRIPTION Modified: trunk/octave-forge/main/financial/DESCRIPTION =================================================================== --- trunk/octave-forge/main/financial/DESCRIPTION 2012-04-18 21:23:32 UTC (rev 10282) +++ trunk/octave-forge/main/financial/DESCRIPTION 2012-04-18 21:28:42 UTC (rev 10283) @@ -1,6 +1,6 @@ Name: financial -Version: 0.3.2 -Date: 2008-08-17 +Version: 0.4.0 +Date: 2012-04-18 Author: Bill Denney <bi...@de...>, Kurt Hornik <Kur...@wu...> Maintainer: Octave-Forge community <oct...@li...> Title: Financial This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-18 21:23:38
|
Revision: 10282 http://octave.svn.sourceforge.net/octave/?rev=10282&view=rev Author: carandraug Date: 2012-04-18 21:23:32 +0000 (Wed, 18 Apr 2012) Log Message: ----------- hhigh: fix small bug introduced on r10268 when setting function defaults on function line Revision Links: -------------- http://octave.svn.sourceforge.net/octave/?rev=10268&view=rev Modified Paths: -------------- trunk/octave-forge/main/financial/inst/hhigh.m Modified: trunk/octave-forge/main/financial/inst/hhigh.m =================================================================== --- trunk/octave-forge/main/financial/inst/hhigh.m 2012-04-18 20:56:52 UTC (rev 10281) +++ trunk/octave-forge/main/financial/inst/hhigh.m 2012-04-18 21:23:32 UTC (rev 10282) @@ -25,7 +25,7 @@ ## @seealso{llow} ## @end deftypefn -function hhv = hhigh (data, nperiods = 14, dim = find (size (data) > 1, 1);) +function hhv = hhigh (data, nperiods = 14, dim = find (size (data) > 1, 1)) if nargin < 1 || nargin > 3 print_usage (); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <prn...@us...> - 2012-04-18 21:14:58
|
Revision: 10278 http://octave.svn.sourceforge.net/octave/?rev=10278&view=rev Author: prnienhuis Date: 2012-04-18 20:08:33 +0000 (Wed, 18 Apr 2012) Log Message: ----------- Updated to latest development Modified Paths: -------------- trunk/octave-forge/main/io/NEWS Modified: trunk/octave-forge/main/io/NEWS =================================================================== --- trunk/octave-forge/main/io/NEWS 2012-04-18 20:04:29 UTC (rev 10277) +++ trunk/octave-forge/main/io/NEWS 2012-04-18 20:08:33 UTC (rev 10278) @@ -8,6 +8,7 @@ with jopendocument v 1.3b1 ** Compatible with jOpenDocument version 1.3b1 + getUsedRange() method added (MUCH faster than the old hack) ** Compatible with Apache POI 3.8 final This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nir...@us...> - 2012-04-18 21:14:55
|
Revision: 10280 http://octave.svn.sourceforge.net/octave/?rev=10280&view=rev Author: nir-krakauer Date: 2012-04-18 20:44:05 +0000 (Wed, 18 Apr 2012) Log Message: ----------- Added circulant matrix category and function listing to INDEX file Modified Paths: -------------- trunk/octave-forge/main/linear-algebra/INDEX Modified: trunk/octave-forge/main/linear-algebra/INDEX =================================================================== --- trunk/octave-forge/main/linear-algebra/INDEX 2012-04-18 20:42:20 UTC (rev 10279) +++ trunk/octave-forge/main/linear-algebra/INDEX 2012-04-18 20:44:05 UTC (rev 10280) @@ -69,3 +69,9 @@ @kronprod/transpose @kronprod/uminus @kronprod/uplus + +Circulant matrices + circulant_make_matrix + circulant_matrix_vector_product + circulant_eig + circulant_inv This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2012-04-18 20:57:02
|
Revision: 10281 http://octave.svn.sourceforge.net/octave/?rev=10281&view=rev Author: carandraug Date: 2012-04-18 20:56:52 +0000 (Wed, 18 Apr 2012) Log Message: ----------- tiff_tag_read: deal with multiple tag and IFD beyond the first and improved documentation Modified Paths: -------------- trunk/octave-forge/main/image/NEWS trunk/octave-forge/main/image/inst/tiff_tag_read.m Modified: trunk/octave-forge/main/image/NEWS =================================================================== --- trunk/octave-forge/main/image/NEWS 2012-04-18 20:44:05 UTC (rev 10280) +++ trunk/octave-forge/main/image/NEWS 2012-04-18 20:56:52 UTC (rev 10281) @@ -63,4 +63,9 @@ ** `isrgb' now returns false for logical matrix. + ** `tiff_tag_read' had several bug fixes and can now check IFDs beyond + the first. It can also accept mutiple tag values and IFDs simultaneously + and return a matrix of the values found. Its documentation has been + expanded (as well as an explanation of TIFF structure on the source) + ** Package is no longer automatically loaded. Modified: trunk/octave-forge/main/image/inst/tiff_tag_read.m =================================================================== --- trunk/octave-forge/main/image/inst/tiff_tag_read.m 2012-04-18 20:44:05 UTC (rev 10280) +++ trunk/octave-forge/main/image/inst/tiff_tag_read.m 2012-04-18 20:56:52 UTC (rev 10281) @@ -1,4 +1,4 @@ -## Copyright (C) 2010 Carnë Draug <car...@gm...> +## Copyright (C) 2010-2012 Carnë Draug <car...@gm...> ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software @@ -14,16 +14,64 @@ ## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} [@var{value}, @var{offset}] = tiff_tag_read (@var{file}, @var{tag}, @var{ifd}) -## Reads the values of TIFF file tags. +## @deftypefn {Function File} {[@var{value}, @var{offset}] =} tiff_tag_read (@var{file}, @var{tag}) +## @deftypefnx {Function File} {[@var{value}, @var{offset}] =} tiff_tag_read (@var{file}, @var{tag}, @var{ifd}) +## @deftypefnx {Function File} {[@var{value}, @var{offset}] =} tiff_tag_read (@var{file}, @var{tag}, "all") +## Read value of @var{tag}s from TIFF files. ## -## @var{file} is a TIFF file and @var{tag} is the tag number to read. If -## @var{ifd} is given, only the tag value from that IFD (Image File Directory) -## will be read. By default, reads only the first IFD. +## @var{file} must be a TIFF file and @var{tag} should be a tag ID. To check +## multiple tags, @var{tag} can be a vector. If @var{ifd} is supplied, only +## those IFDs (Image File Directory) will be read. As with @var{tag}, multiple +## IFDs can be checked by using a vector or with the string `all'. By default, +## only the first IFD is read. ## -## @var{value} is the read value from @var{tag}. @var{offset} will be @code{1} -## if @var{value} is a file offset. +## @var{value} and @var{offset} will be a matrix with a number of rows and +## columns equal to the number of @var{tag}s and @var{ifd}s requested. The index +## relate to the same order as the input. @var{offset} has the same structure as +## @var{value} and when equal to 1 its matching value on @var{value} will be an +## offset to a position in the file. ## +## @var{tag}s that can't be found will have a value of 0 and the corresponding +## @var{offset} will be 2. +## +## If an error occurs when reading @var{file} (such as lack of permissions of file +## is not a TIFF file), @var{offset} is set to -1 and @var{value} contains the +## error message. +## +## See the following examples: +## @example +## @group +## ## read value of tag 258 on IFD 1 (`off' will be 1 if `val' is an offset or 2 if not found) +## [val, off] = tiff_tag_read (filepath, 258); +## @end group +## @end example +## +## @example +## @group +## ## read value 258, 262, 254 o IFD 1 (`val' and `off' will be a 1x3 matrix) +## [val, off] = tiff_tag_read (filepath, [258 262 254]); +## if (off(1) == -1), error ("something happpened: %s", val); endif +## off(2,1) # will be 1 if val(2,1) is an offset to a file position or 2 if tag was not found +## val(2,1) # value of tag 262 on IFD 1 +## @end group +## @end example +## +## @example +## @group +## ## read value 258, 262, 254 on the first 10 IFDs 1 (`val' and `off' will be a 1x10 matrix) +## [val, off] = tiff_tag_read (filepath, [258 262 254], 1:10); +## val(2,5) # value of tag 262 on IFD 5 +## @end group +## @end example +## +## @example +## @group +## ## read value 258, 262, 254 o IFD 1 (`val' and `off' will be a 1x3 matrix) +## [val, off] = tiff_tag_read (filepath, [258 262 254], "all"); +## val(2,end) # value of tag 262 on the last IFD +## @end group +## @end example +## ## @seealso{imread, imfinfo, readexif} ## @end deftypefn @@ -36,6 +84,26 @@ ## and the function tiff_read by F. Nedelec, EMBL (www.cytosim.org) ## * http://www.cytosim.org/misc/index.html ## +## Explanation of the TIFF file structure: +## +## The idea of multi-page images meeds to be understood first. These allow one file +## to have multiple images. This may sound strange but consider situtations such as +## an MRI scan (one file can then contain one scan which is multiple images across +## one of the axis) or time-lapse experiment (where one file is not unlike a movie). +## TIFF files support this by being like a container of single images, called IFD +## (Image File Directory). For each page there will be a single IFD. One can see a +## TIFF as an archive file of multiple images files that many times have a single file. +## +## Each TIFF file starts with a small header that identifies the file as TIFF. The +## header ends with the position on the file for the first IFD. Each IFD has multiple +## entries that hold information about the image of that IFD including where on the +## file is the actual image. Each IFD entry is identified by a tag. Each tag has a +## unique meaning; for example, the IFD entry with tag 259 will say the compression +## type (if any), of the image in that IFD. +## +## A TIFF file will always have at least one IFD and each IFD will always have at +## least one IFD entry. +## ## * On the TIFF image file header: ## bytes 00-01 --> byte order used within the file: "II" for little endian ## and "MM" for big endian byte ordering. @@ -47,14 +115,13 @@ ## ## * On a TIFF's IFD structure: ## bytes 00-01 --> number of entries (or tags or fields or directories) -## bytes 02-13 --> the entry (the tag is repeated the number of times -## specified at the start of the IFD, but always takes -## 12 bytes of size) -## bytes XX-XX --> file offset for next IFD (last 4 bytes of the IFD) +## bytes 02-13 --> the IFD entry #0 +## bytes 14+=11 -> the IFD entry #N. Each will have exactly 12 bytes (the +## number of IFD entries was specified at the start of the IFD) +## bytes XX-XX --> file offset for next IFD (last 4 bytes of the IFD) or 0 +## if it's the last IFD ## -## Note: there must be always one IFD and each IFD must have at least one entry -## -## * On an IFD entry (or TIFF's field) structure: +## * On an IFD entry structure: ## bytes 00-01 --> tag that identifies the entry ## bytes 02-03 --> entry type ## 1 --> BYTE (uint8) @@ -69,128 +136,171 @@ ## 10 --> FLOAT (single IEEE precision) ## 11 --> DOUBLE (double IEEE precision) ## bytes 04-07 --> number of values (count) -## bytes 08-11 --> file offset to the value or value (only if it fits in 4 bytes) +## bytes 08-11 --> file offset (from the beggining of file) or value (only if +## it fits in 4 bytes). It is possible that the offset is for +## a structure and not a value so we return the offset ## ## Note: file offset of the value may point anywhere in the file, even after the image. +## +## Tags numbered >= 32768 are private tags +## Tags numbered on the 65000--65535 range are reusable tags -function [value, offset] = tiff_tag_read (file, tag, ifd) +function [val, off] = tiff_tag_read (file, tag, ifd = 1) + if (nargin < 2 || nargin > 3) + print_usage; + elseif (!isnumeric (tag) || !isvector (tag)) + error ("`tag' must be either a numeric scalar or vector with tags -- identifying number of a field"); + elseif (!(ischar (ifd) && strcmpi (ifd, "all")) && !(isnumeric (ifd) && isvector (ifd) && all (ifd == fix (ifd)) && all (ifd > 0))) + error ("`ifd' must be either the string `all' or numeric scalar or vector of positive integers with the IFD index"); + endif + [FID, msg] = fopen (file, "r", "native"); - if (msg != 0) - error ("Unable to fopen '%s': %s.", file, msg); + if (FID == -1) + [val, off] = bad_exit (FID, sprintf ("Unable to fopen '%s': %s.", file, msg)); + return endif - # Read byte order - byte_order = fread(FID, 2, "char=>char"); - if ( strcmp(byte_order', "II") ) + ## read byte order + byte_order = fread (FID, 2, "char=>char")'; # if we are retrieving a char, we need to transpose to get the string + if (strcmp (byte_order, "II")) arch = "ieee-le"; # IEEE little endian format - elseif ( strcmp(byte_order',"MM") ) + elseif (strcmp (byte_order,"MM")) arch = "ieee-be"; # IEEE big endian format else - error("First 2 bytes of header returned '%s'. TIFF file expects either 'II' or 'MM'.", byte_order'); + [val, off] = bad_exit (FID, sprintf ("First 2 bytes of '%s' returned '%s'. For TIFF should either be 'II' or 'MM'. Are you sure it's a TIFF.", file, byte_order)); + return endif - # Read number 42 - nTIFF = fread(FID, 1, "uint16", arch); + ## read number 42 + nTIFF = fread (FID, 1, "uint16", arch); if (nTIFF != 42) - error("This is not a TIFF file (missing 42 on header at offset 2. Instead got '%g').", tiff_id); + [val, off] = bad_exit (FID, sprintf ("'%s' is not a TIFF (missing value 42 on header at offset 2. Instead got '%g').", file, tiff_id)); + return endif - # Read offset and move for the first IFD - offset_IFD = fread(FID, 1, "uint32", arch); - status = fseek(FID, offset_IFD, "bof"); - if (status != 0) - error("Error on fseek when moving to first IFD."); + if (ischar (ifd) && strcmpi (ifd, "all")) + all_ifd = true; + else + all_ifd = false; endif - # Read number of entries (nTag) and look for the desired tag ID - nTag = fread(FID, 1, "uint16", arch); - iTag = 0; # Tag index - while (1) # Control is made inside the loop - iTag++; - cTag = fread(FID, 1, "uint16", arch); # Tag ID - if (cTag == tag) # Tag ID was found - value = read_value (FID, arch, tag); # Read tag value - break - elseif (iTag == nTag || cTag > tag) # All tags have been read (tags are in ascendent order) - error ("Unable to find tag %g.", tag) - endif - status = fseek(FID, 10, "cof"); # Move to the next tag + ## default values for val and off + def_val = 0; + def_off = 2; + + ## start output values with default values + if (ischar (ifd) && strcmpi (ifd, "all")) + val = def_val * ones (numel (tag), 1); + off = def_off * ones (numel (tag), 1); + else + val = def_val * ones (numel (tag), numel (ifd)); + off = def_off * ones (numel (tag), numel (ifd)); + endif + + ## read offset for the first IFD and move into it + offset_IFD = fread (FID, 1, "uint32", arch); + + cIFD = 1; # current IFD + while (offset_IFD != 0 && (all_ifd || any (ifd >= cIFD))) + status = fseek (FID, offset_IFD, "bof"); if (status != 0) - error("Error on fseek when moving to tag %g of %g. Last tag read had value of %g", rTag, nTag, tag); + [val, off] = bad_exit (FID, sprintf ("error on fseek when moving to IFD #%g", cIFD)); + return endif + + ## if checking on all IFD, add one column to the output + if (all_ifd) + val(:, end+1) = def_val; + off(:, end+1) = def_off; + endif + + ## read number of entries (nTag) and look for the desired tag ID + nTag = fread (FID, 1, "uint16", arch); # number of tags in the IFD + cTag = 1; # current tag + while (nTag >= cTag) + tagID = fread (FID, 1, "uint16", arch); # current tag ID + if (any(tagID == tag)) # found one + ## column number of this IFD in the output matrix: + ## we don't know at start the number of IFD so if all IFD have been requested + ## we can't find them in `ifd', we need to set the index for output manually + if (all_ifd) + iCol = cIFD; + else + iCol = (ifd == cIFD); + endif + [val(tagID == tag, iCol), ... + off(tagID == tag, iCol) ] = read_value (FID, arch); # read tag value + elseif (all (tag < tagID)) + ## tags are in numeric order so if they wanted tags are all below current tag ID + ## we can jump over to the next IFD + skip_bytes = 10 + (12 * (nTag - cTag)); + status = fseek (FID, skip_bytes, "cof"); # Move to the next IFD + break + else + status = fseek (FID, 10, "cof"); # Move to the next tag + if (status != 0) + [val, off] = bad_exit (FID, sprintf ("error on fseek when moving out of tag #%g (tagID %g) on IFD %g.", cTag, tagID, cIFD)); + return + endif + endif + cTag++; + endwhile + + offset_IFD = fread (FID, 1, "uint32", arch); + cIFD++; endwhile - fclose (FID); - endfunction -##### -function [value, offset] = read_value (FID, arch, tag) +function [val, off] = read_value (FID, arch) - tiff_type = fread(FID, 1, "uint16", arch); - count = fread(FID, 1, "uint32", arch); - - switch (tiff_type) - case 1 # BYTE = 8-bit unsigned integer - nBytes = 1; - precision = "uint8"; - case 2 # ASCII = 8-bit byte that contains a 7-bit ASCII code; the last byte must be NUL (binary zero) - nBytes = 1; - precision = "uchar"; - case 3 # SHORT = 16-bit (2-byte) unsigned integer - nBytes = 2; - precision = "uint16"; - case 4 # LONG = 32-bit (4-byte) unsigned integer - nBytes = 4; - precision = "uint32"; - case 5 # RATIONAL = Two LONGs: the first represents the numerator of a fraction; the second, the denominator - nBytes = 8; - precision = "uint32"; - case 6 # SBYTE = An 8-bit signed (twos-complement) integer - nBytes = 1; - precision = "int8"; - case 7 # UNDEFINED = An 8-bit byte that may contain anything, depending on the definition of the field - nBytes = 1; - precision = "uchar"; - case 8 # SSHORT = A 16-bit (2-byte) signed (twos-complement) integer - nBytes = 2; - precision = "int16"; - case 9 # SLONG = A 32-bit (4-byte) signed (twos-complement) integer - nBytes = 4; - precision = "int32"; - case 10 # SRATIONAL = Two SLONG’s: the first represents the numerator of a fraction, the second the denominator - nBytes = 8; - precision = "int32"; - case 11 # FLOAT = Single precision (4-byte) IEEE format - nBytes = 4; - precision = "float32"; - case 12 # DOUBLE = Double precision (8-byte) IEEE format - nBytes = 8; - precision = "float64"; - otherwise # Warning (from TIFF file specifications): It is possible that other TIFF field types will be added in the future - error("TIFF type %i not supported", tiff_type) + position = ftell (FID); + field_type = fread (FID, 1, "uint16", arch); + count = fread (FID, 1, "uint32", arch); + switch (field_type) + case 1, nBytes = 1; precision = "uint8"; # BYTE = 8-bit unsigned integer + case 2, nBytes = 1; precision = "uchar"; # ASCII = 8-bit byte that contains a 7-bit ASCII code; the last byte must be NUL (binary zero) + case 3, nBytes = 2; precision = "uint16"; # SHORT = 16-bit (2-byte) unsigned integer + case 4, nBytes = 4; precision = "uint32"; # LONG = 32-bit (4-byte) unsigned integer + case 5, nBytes = 8; precision = "uint32"; # RATIONAL = Two LONGs: the first represents the numerator of a fraction; the second, the denominator + case 6, nBytes = 1; precision = "int8"; # SBYTE = An 8-bit signed (twos-complement) integer + case 7, nBytes = 1; precision = "uchar"; # UNDEFINED = An 8-bit byte that may contain anything, depending on the definition of the field + case 8, nBytes = 2; precision = "int16"; # SSHORT = A 16-bit (2-byte) signed (twos-complement) integer + case 9, nBytes = 4; precision = "int32"; # SLONG = A 32-bit (4-byte) signed (twos-complement) integer + case 10, nBytes = 8; precision = "int32"; # SRATIONAL = Two SLONG’s: the first represents the numerator of a fraction, the second the denominator + case 11, nBytes = 4; precision = "float32"; # FLOAT = Single precision (4-byte) IEEE format + case 12, nBytes = 8; precision = "float64"; # DOUBLE = Double precision (8-byte) IEEE format + otherwise + ## From the TIFF file specification (page 16, section 2: TIFF structure): + ## "Warning: It is possible that other TIFF field types will be added in the + ## future. Readers should skip over fields containing an unexpected field type." + ## + ## However, we only get to this point of the code if we are in the tag requested + ## by the use so it makes sense to error if we don't supported it yet. + error ("TIFF type %i not supported", field_type); endswitch - if ( (nBytes*count) > 4 ) # If it doesn't fit in 4 bytes, it's an offset - offset = 1; - value = fread(FID, 1, "uint32", arch); - ## The file offset must be an even number - if ( rem(value,2) != 0 ) - error("Couldn't find correct value offset for tag %g", tag); + if ((nBytes*count) > 4) + off = true; + val = fread (FID, 1, "uint32", arch); + if (rem (val, 2) != 0) # file offset must be an even number + warning ("Found an offset with an odd value %g (offsets should always be even numbers.", val); endif else - offset = 0; - ## read here + off = false; switch precision - case { 5, 10 } - value = fread(FID, 2*count, precision, arch); - otherwise - value = fread(FID, count, precision, arch); + case {5, 10} val = fread (FID, 2*count, precision, arch); val = val(1)/val(2); # the first represents the numerator of a fraction; the second, the denominator + case {2} val = fread (FID, count, [precision "=>char"], arch)'; # if we are retrieving a char, we need to transpose to get the string + otherwise val = fread (FID, count, precision, arch); endswitch - if (precision == 2) - value = char(value'); - endif + ## adjust position to end of IFD entry (not all take up 4 Bytes) + fseek (FID, 4 - (nBytes*count), "cof"); endif +endfunction +function [val, off] = bad_exit (FID, msg) + off = -1; + val = sprintf (msg); + fclose (FID); endfunction This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nir...@us...> - 2012-04-18 20:42:30
|
Revision: 10279 http://octave.svn.sourceforge.net/octave/?rev=10279&view=rev Author: nir-krakauer Date: 2012-04-18 20:42:20 +0000 (Wed, 18 Apr 2012) Log Message: ----------- Added new functions for working with circulant matrices Added Paths: ----------- trunk/octave-forge/main/linear-algebra/inst/circulant_eig.m trunk/octave-forge/main/linear-algebra/inst/circulant_inv.m trunk/octave-forge/main/linear-algebra/inst/circulant_make_matrix.m trunk/octave-forge/main/linear-algebra/inst/circulant_matrix_vector_product.m Added: trunk/octave-forge/main/linear-algebra/inst/circulant_eig.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/circulant_eig.m (rev 0) +++ trunk/octave-forge/main/linear-algebra/inst/circulant_eig.m 2012-04-18 20:42:20 UTC (rev 10279) @@ -0,0 +1,60 @@ +## Copyright (C) 2012 Nir Krakauer +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; If not, see <http://www.gnu.org/licenses/>. + +## -*- texinfo -*- +## @deftypefn{Function File}{[@var{lambda}] =} circulant_eig (@var{v}) +## @deftypefnx{Function File}{[@var{vs}, @var{lambda}] =} circulant_eig (@var{v}) +## +## Fast, compact calculation of eigenvalues and eigenvectors of a circulant matrix@* +## Given an @var{n}*1 vector @var{v}, return the eigenvalues @var{lambda} and optionally eigenvectors @var{vs} of the @var{n}*@var{n} circulant matrix @var{C} that has @var{v} as its first column +## +## Theoretically same as @code{eig(make_circulant_matrix(v))}, but many fewer computations; does not form @var{C} explicitly +## +## Reference: Robert M. Gray, Toeplitz and Circulant Matrices: A Review, Now Publishers, http://ee.stanford.edu/~gray/toeplitz.pdf, Chapter 3 +## +## @end deftypefn +## @seealso{circulant_make_matrix, circulant_matrix_vector_product, circulant_inv} + +## Author: Nir Krakauer <nkr...@cc...> + +function [a, b] = circulant_eig(v) + + +warning ("off", "Octave:broadcast"); #the code below uses broadcasting + +#find the eigenvalues +n = numel(v); +lambda = ones(n, 1); +s = (0:(n-1)); +lambda = sum(v .* exp(-2*pi*i*s'*s/n))'; + +if nargout < 2 + a = lambda; + return +endif + +#find the eigenvectors (which in fact do not depend on v) +a = exp(-2*i*pi*s'*s/n) / sqrt(n); +b = diag(lambda); + + +endfunction + + +%!shared v,C,vs,lambda +%! v = [1 2 3]'; +%! C = circulant_make_matrix(v); +%! [vs lambda] = circulant_eig(v); +%!assert (vs*lambda, C*vs, 100*eps); Added: trunk/octave-forge/main/linear-algebra/inst/circulant_inv.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/circulant_inv.m (rev 0) +++ trunk/octave-forge/main/linear-algebra/inst/circulant_inv.m 2012-04-18 20:42:20 UTC (rev 10279) @@ -0,0 +1,49 @@ +## Copyright (C) 2012 Nir Krakauer +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; If not, see <http://www.gnu.org/licenses/>. + +## -*- texinfo -*- +## @deftypefn{Function File}{[@var{c}] =} circulant_inv (@var{v}) +## +## Fast, compact calculation of inverse of a circulant matrix@* +## Given an @var{n}*1 vector @var{v}, return the inverse @var{c} of the @var{n}*@var{n} circulant matrix @var{C} that has @var{v} as its first column +## The returned @var{c} is the first column of the inverse, which is also circulant -- to get the full matrix, use `circulant_make_matrix(c)' +## +## Theoretically same as @code{inv(make_circulant_matrix(v))(:, 1)}, but requires many fewer computations and does not form matrices explicitly +## +## Roundoff may induce a small imaginary component in @var{c} even if @var{v} is real -- use @code{real(c)} to remedy this +## +## Reference: Robert M. Gray, Toeplitz and Circulant Matrices: A Review, Now Publishers, http://ee.stanford.edu/~gray/toeplitz.pdf, Chapter 3 +## +## @end deftypefn +## @seealso{circulant_make_matrix, circulant_matrix_vector_product, circulant_eig} + +## Author: Nir Krakauer <nkr...@cc...> + +function c = circulant_inv(v) + + +## Find the eigenvalues and eigenvectors +[vs, lambda] = circulant_eig(v); + +## Find the first column of the inverse +c = vs * diag(1 ./ diag(lambda)) * conj(vs(:, 1)); + + +endfunction + + +%!shared v +%! v = [1 2 3]'; +%!assert (make_circulant_matrix(circulant_inv(v)), inv(make_circulant_matrix(v)), 10*eps); Added: trunk/octave-forge/main/linear-algebra/inst/circulant_make_matrix.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/circulant_make_matrix.m (rev 0) +++ trunk/octave-forge/main/linear-algebra/inst/circulant_make_matrix.m 2012-04-18 20:42:20 UTC (rev 10279) @@ -0,0 +1,46 @@ +## Copyright (C) 2012 Nir Krakauer +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; If not, see <http://www.gnu.org/licenses/>. + +## -*- texinfo -*- +## @deftypefn{Function File}{[@var{C}] =} circulant_make_matrix(@var{v}) +## +## Produce a full circulant matrix given the first column@* +## Given an @var{n}*1 vector @var{v}, returns the @var{n}*@var{n} circulant matrix @var{C} where @var{v} is the left column and all other columns are downshifted versions of @var{v} +## +## Note: If the first row @var{r} of a circulant matrix is given, the first column @var{v} can be obtained as @code{v = r([1 end:-1:2])} +## +## Reference: Gene H. Golub and Charles F. Van Loan, Matrix Computations, 3rd Ed., Section 4.7.7 +## +## @end deftypefn +## @seealso{circulant_matrix_vector_product, circulant_eig, circulant_inv} + +## Author: Nir Krakauer <nkr...@cc...> + + +function C = circulant_make_matrix(v) + +n = numel(v); + +C = ones(n, n); + +for i = 1:n + C(:, i) = v([(end-i+2):end 1:(end-i+1)]); #or circshift(v, i-1) +endfor + +endfunction + +%!shared v,C +%! v = [1 2 3]'; C = [1 3 2; 2 1 3; 3 2 1]; +%!assert (circulant_make_matrix(v), C); Added: trunk/octave-forge/main/linear-algebra/inst/circulant_matrix_vector_product.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/circulant_matrix_vector_product.m (rev 0) +++ trunk/octave-forge/main/linear-algebra/inst/circulant_matrix_vector_product.m 2012-04-18 20:42:20 UTC (rev 10279) @@ -0,0 +1,48 @@ +## Copyright (C) 2012 Nir Krakauer +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; If not, see <http://www.gnu.org/licenses/>. + +## -*- texinfo -*- +## @deftypefn{Function File}{[@var{y}] =} circulant_matrix_vector_product(@var{v}, @var{x}) +## +## Fast, compact calculation of the product of a circulant matrix with a vector@* +## Given @var{n}*1 vectors @var{v} and @var{x}, return the matrix-vector product @var{y} = @var{C}@var{x}, where @var{C} is the @var{n}*@var{n} circulant matrix that has @var{v} as its first column +## +## Theoretically the same as @code{make_circulant_matrix(x) * v}, but does not form @var{C} explicitly; uses the discrete Fourier transform +## +## Because of roundoff, the returned @var{y} may have a small imaginary component even if @var{v} and @var{x} are real (use @code{real(y)} to remedy this) +## +## Reference: Gene H. Golub and Charles F. Van Loan, Matrix Computations, 3rd Ed., Section 4.7.7 +## +## @end deftypefn +## @seealso{circulant_make_matrix, circulant_eig, circulant_inv} + +## Author: Nir Krakauer <nkr...@cc...> + +function y = circulant_matrix_vector_product(v, x) + + +xf = fft(x); +vf = fft(v); +z = vf .* xf; +y = ifft(z); + + +endfunction + + + +%!shared v,x +%! v = [1 2 3]'; x = [2 5 6]'; +%!assert (circulant_matrix_vector_product(v, x), circulant_make_matrix(v)*x, eps); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <prn...@us...> - 2012-04-18 20:04:36
|
Revision: 10277 http://octave.svn.sourceforge.net/octave/?rev=10277&view=rev Author: prnienhuis Date: 2012-04-18 20:04:29 +0000 (Wed, 18 Apr 2012) Log Message: ----------- Added getUsedRange() method for JOD 1.3x and above Modified Paths: -------------- trunk/octave-forge/main/io/inst/getusedrange.m Modified: trunk/octave-forge/main/io/inst/getusedrange.m =================================================================== --- trunk/octave-forge/main/io/inst/getusedrange.m 2012-04-18 16:20:26 UTC (rev 10276) +++ trunk/octave-forge/main/io/inst/getusedrange.m 2012-04-18 20:04:29 UTC (rev 10277) @@ -67,7 +67,7 @@ ## 2011-09-08 Style & layout updates ## 2012-01-26 Fixed "seealso" help string ## -## Last subfunc update: 2012-04-09 (JOD) +## Last subfunc update: 2012-04-18 (JOD) function [ trow, lrow, lcol, rcol ] = getusedrange (spptr, ii) @@ -166,11 +166,11 @@ reprows = 0; endif - # Get leftmost cell column number + # Get leftmost cell column number lcell = row.getFirstChild (); cl_char = char (lcell); - # Swap the following lines into comment to catch a jOpenDocument bug which foobars OTK - # (JOD doesn't set <office:value-type='string'> attribute when writing strings + # Swap the following lines into comment to catch a jOpenDocument bug which foobars OTK + # (JOD doesn't set <office:value-type='string'> attribute when writing strings #if (isempty (findstr ('office:value-type', cl_char)) || isempty (findstr ('<text:', cl_char))) if (isempty (findstr ('office:value-type', cl_char))) lcol = min (lcol, lcell.getTableNumberColumnsRepeatedAttribute () + 1); @@ -232,124 +232,151 @@ ## Created: 2010-05-25 ## Last updates: ## 2010-05-31 Fixed ignoring table-covered-cells; fixed count of sheets comprising just A1:A1 -## Added option for wsh being a string argument +## '' Added option for wsh being a string argument ## 2010-08-12 Little textual adaptations ## 2010-11-13 Catched jOpenDocument bug (1.2bx) where string cells have no office:value-type ## '' attrb set (by JOD). Somehow OTK is more robust as it catches these cells ## 2012-04-09 Fixed rowrepcnt (str2num not applied to tablerow) +## 2012-04-18 Added getUsedRange() method for JOD 1.3x and above function [ trow, brow, lcol, rcol ] = getusedrange_jod (ods, wsh) - # This function works by virtue of sheets in JOD actually being a Java string. - # It works outside of the Java memory/heap space which is an added benefit... - # (Read: this is one big dirty hack...... prone to crash Java on BIG spreadsheets) + # This function works by virtue of sheets in JOD actually being a Java string. + # It works outside of the Java memory/heap space which is an added benefit... + # (Read: this is one big dirty hack...... prone to crash Java on BIG spreadsheets) - if (isnumeric (wsh)) - sh = char (ods.workbook.getSheet (wsh - 1)); - else - sh = char (ods.workbook.getSheet (wsh)); - endif + if (isnumeric (wsh)) + sh = ods.workbook.getSheet (wsh - 1); + else + sh = ods.workbook.getSheet (wsh); + endif - # Get table-row pointers - id_trow = strfind (sh, '<table:table-row'); - id = strfind (sh, '</table:table>') - 1; - id_trow = [id_trow id]; + try + # Let's see if we have JOD v. 1.3x. If not, next call fails & we'll fall back to the old hack + sh_rng = char (sh.getUsedRange ()); + if (isempty (sh_rng)) + # Empty sheet + trow = brow = lcol = rcol = 0; + else + # Strip sheet name + sh_rng = sh_rng(length (sh.getName) + 2 : end); + # Get rid of period + sh_rng = strrep (sh_rng, '.', ''); + [~, nr, nc, trow, lcol] = parse_sp_range (sh_rng); + brow = trow + nr - 1; + rcol = lcol + nc - 1; + endif + return + + catch + # This function works by virtue of sheets in JOD actually being a Java string. + # It works outside of the Java memory/heap space which is an added benefit... + # (Read: this is one big dirty hack...... prone to crash Java on BIG spreadsheets) - trow = rcol = 0; - lcol = 1024; brow = 0; - if (~isempty (id)) - # Loop over all table-rows - rowrepcnt = 0; - for irow = 1:length (id_trow)-1 - # Isolate single table-row - tablerow = sh(id_trow(irow):id_trow(irow+1)-1); - # Search table-cells. table-c covers both table-cell & table-covered-cell - id_tcell = strfind (tablerow, '<table:table-c'); - id_tcell = [id_tcell id]; - rowl = length (tablerow); - if (isempty (id_tcell(1:end-1))) - rowend = rowl; - else - rowend = id_tcell(1); - endif - # Add in table-number-rows-repeated attribute values - rowrept = strfind (tablerow(1:rowend), 'number-rows-repeated'); - if (~isempty (rowrept)) - [st, en] = regexp (tablerow(rowrept:min (rowend, rowrept+30)), '\d+'); - rowrepcnt += str2num (tablerow(rowrept+st-1:min (rowend, rowrept+en-1))) - 1; - endif + sh = char (sh); - # Search table-cells. table-c is a table-covered-cell that is considered empty - id_tcell = strfind (tablerow, '<table:table-c'); - if (~isempty (id_tcell)) - # OK, this row has a value cell. Now table-covered-cells must be included. - id_tcell2 = strfind (tablerow, '<table:covered-t'); - if (~isempty (id_tcell2)) id_tcell = sort ([id_tcell id_tcell2]); endif - id_tcell = [id_tcell rowl]; - # Search for non-empty cells (i.e., with an office:value-type attribute). But: - # jOpenDocument 1.2b3 has a bug: it often doesn't set this attr for string cells - id_valtcell = strfind (tablerow, 'office:value-type='); - id_textonlycell = strfind (tablerow, '<text:'); - id_valtcell = sort ([id_valtcell id_textonlycell]); - id_valtcell = [id_valtcell rowl]; - if (~isempty (id_valtcell(1:end-1))) - brow = irow + rowrepcnt; - # First set trow if it hadn't already been found - if (~trow) trow = irow; endif - # Search for repeated table-cells - id_reptcell = strfind (tablerow, 'number-columns-repeated'); - id_reptcell = [id_reptcell rowl]; - # Search for leftmost non-empty table-cell. llcol = counter for this table-row - llcol = 1; - while (id_tcell (llcol) < id_valtcell(1) && llcol <= length (id_tcell) - 1) - ++llcol; - endwhile - --llcol; - # Compensate for repeated cells. First count all repeats left of llcol - ii = 1; - repcnt = 0; - if (~isempty (id_reptcell(1:end-1))) - # First try lcol - while (ii <= length (id_reptcell) - 1 && id_reptcell(ii) < id_valtcell(1)) - # Add all repeat counts left of leftmost data tcell minus 1 for each - [st, en] = regexp (tablerow(id_reptcell(ii):id_reptcell(ii)+30), '\d+'); - repcnt += str2num (tablerow(id_reptcell(ii)+st-1:id_reptcell(ii)+en-1)) - 1; - ++ii; - endwhile - # Next, add current repcnt value to llcol and update lcol - lcol = min (lcol, llcol + repcnt); - # Get last value table-cell in table-cell idx - jj = 1; - while (id_tcell (jj) < id_valtcell(length (id_valtcell)-1)) - ++jj; - endwhile + # Get table-row pointers + id_trow = strfind (sh, '<table:table-row'); + id = strfind (sh, '</table:table>') - 1; + id_trow = [id_trow id]; - # Get rest of column repeat counts in value table-cell range - while (ii < length (id_reptcell) && id_reptcell(ii) < id_tcell(jj)) - # Add all repeat counts minus 1 for each tcell in value tcell range - [st, en] = regexp (tablerow(id_reptcell(ii):id_reptcell(ii)+30), '\d+'); - repcnt += str2num (tablerow(id_reptcell(ii)+st-1:id_reptcell(ii)+en-1)) - 1; - ++ii; - endwhile - else - # In case left column = A - lcol = min (lcol, llcol); - endif - # Count all table-cells in value table-cell-range - ii = 1; # Indexes cannot be negative - while (ii < length (id_tcell) && id_tcell(ii) < id_valtcell(length (id_valtcell) - 1)) - ++ii; - endwhile - --ii; - rcol = max (rcol, ii + repcnt); - endif - endif - endfor - else - # No data found, empty sheet - lcol = rcol = brow = trow = 0; - endif + trow = rcol = 0; + lcol = 1024; brow = 0; + if (~isempty (id)) + # Loop over all table-rows + rowrepcnt = 0; + for irow = 1:length (id_trow)-1 + # Isolate single table-row + tablerow = sh(id_trow(irow):id_trow(irow+1)-1); + # Search table-cells. table-c covers both table-cell & table-covered-cell + id_tcell = strfind (tablerow, '<table:table-c'); + id_tcell = [id_tcell id]; + rowl = length (tablerow); + if (isempty (id_tcell(1:end-1))) + rowend = rowl; + else + rowend = id_tcell(1); + endif + # Add in table-number-rows-repeated attribute values + rowrept = strfind (tablerow(1:rowend), 'number-rows-repeated'); + if (~isempty (rowrept)) + [st, en] = regexp (tablerow(rowrept:min (rowend, rowrept+30)), '\d+'); + rowrepcnt += str2num (tablerow(rowrept+st-1:min (rowend, rowrept+en-1))) - 1; + endif + # Search table-cells. table-c is a table-covered-cell that is considered empty + id_tcell = strfind (tablerow, '<table:table-c'); + if (~isempty (id_tcell)) + # OK, this row has a value cell. Now table-covered-cells must be included. + id_tcell2 = strfind (tablerow, '<table:covered-t'); + if (~isempty (id_tcell2)) id_tcell = sort ([id_tcell id_tcell2]); endif + id_tcell = [id_tcell rowl]; + # Search for non-empty cells (i.e., with an office:value-type attribute). But: + # jOpenDocument 1.2b3 has a bug: it often doesn't set this attr for string cells + id_valtcell = strfind (tablerow, 'office:value-type='); + id_textonlycell = strfind (tablerow, '<text:'); + id_valtcell = sort ([id_valtcell id_textonlycell]); + id_valtcell = [id_valtcell rowl]; + if (~isempty (id_valtcell(1:end-1))) + brow = irow + rowrepcnt; + # First set trow if it hadn't already been found + if (~trow) trow = irow; endif + # Search for repeated table-cells + id_reptcell = strfind (tablerow, 'number-columns-repeated'); + id_reptcell = [id_reptcell rowl]; + # Search for leftmost non-empty table-cell. llcol = counter for this table-row + llcol = 1; + while (id_tcell (llcol) < id_valtcell(1) && llcol <= length (id_tcell) - 1) + ++llcol; + endwhile + --llcol; + # Compensate for repeated cells. First count all repeats left of llcol + ii = 1; + repcnt = 0; + if (~isempty (id_reptcell(1:end-1))) + # First try lcol + while (ii <= length (id_reptcell) - 1 && id_reptcell(ii) < id_valtcell(1)) + # Add all repeat counts left of leftmost data tcell minus 1 for each + [st, en] = regexp (tablerow(id_reptcell(ii):id_reptcell(ii)+30), '\d+'); + repcnt += str2num (tablerow(id_reptcell(ii)+st-1:id_reptcell(ii)+en-1)) - 1; + ++ii; + endwhile + # Next, add current repcnt value to llcol and update lcol + lcol = min (lcol, llcol + repcnt); + # Get last value table-cell in table-cell idx + jj = 1; + while (id_tcell (jj) < id_valtcell(length (id_valtcell)-1)) + ++jj; + endwhile + + # Get rest of column repeat counts in value table-cell range + while (ii < length (id_reptcell) && id_reptcell(ii) < id_tcell(jj)) + # Add all repeat counts minus 1 for each tcell in value tcell range + [st, en] = regexp (tablerow(id_reptcell(ii):id_reptcell(ii)+30), '\d+'); + repcnt += str2num (tablerow(id_reptcell(ii)+st-1:id_reptcell(ii)+en-1)) - 1; + ++ii; + endwhile + else + # In case left column = A + lcol = min (lcol, llcol); + endif + # Count all table-cells in value table-cell-range + ii = 1; # Indexes cannot be negative + while (ii < length (id_tcell) && id_tcell(ii) < id_valtcell(length (id_valtcell) - 1)) + ++ii; + endwhile + --ii; + rcol = max (rcol, ii + repcnt); + endif + endif + endfor + else + # No data found, empty sheet + lcol = rcol = brow = trow = 0; + endif + + end_try_catch + endfunction @@ -413,7 +440,7 @@ erow = ecol = 0; for ii=1:numel (adrblks) # Check if address contains a sheet name in quotes (happens if name contains a period) - if (int8 (adrblks{ii}(1)) == 39) + if (int8 (adrblks{ii}(1)) == 39) # Strip sheet name part idx = findstr (adrblks{ii}, "'."); range = adrblks{ii}(idx+2 : end); @@ -455,30 +482,30 @@ function [ trow, brow, lcol, rcol ] = getusedrange_com (xls, ii) - sh = xls.workbook.Worksheets (ii); - - # Decipher used range. Beware, UsedRange() returns *cached* rectangle of - # all spreadsheet cells containing *anything*, including just formatting - # (i.e., empty cells are included too). ==> This is an approximation only - allcells = sh.UsedRange; - - # Get top left cell as a Range object - toplftcl = allcells.Columns(1).Rows(1); - - # Count number of rows & cols in virtual range from A1 to top left cell - lcol = sh.Range ("A1", toplftcl).columns.Count; - trow = sh.Range ("A1", toplftcl).rows.Count; - - # Add real occupied rows & cols to obtain end row & col - brow = trow + allcells.rows.Count() - 1; - rcol = lcol + allcells.columns.Count() - 1; - - # Check if there are real data - if ((lcol == rcol) && (trow = brow)) - if (isempty (toplftcl.Value)) - trow = brow = lcol = rcol = 0; - endif - endif + sh = xls.workbook.Worksheets (ii); + + # Decipher used range. Beware, UsedRange() returns *cached* rectangle of + # all spreadsheet cells containing *anything*, including just formatting + # (i.e., empty cells are included too). ==> This is an approximation only + allcells = sh.UsedRange; + + # Get top left cell as a Range object + toplftcl = allcells.Columns(1).Rows(1); + + # Count number of rows & cols in virtual range from A1 to top left cell + lcol = sh.Range ("A1", toplftcl).columns.Count; + trow = sh.Range ("A1", toplftcl).rows.Count; + + # Add real occupied rows & cols to obtain end row & col + brow = trow + allcells.rows.Count() - 1; + rcol = lcol + allcells.columns.Count() - 1; + + # Check if there are real data + if ((lcol == rcol) && (trow = brow)) + if (isempty (toplftcl.Value)) + trow = brow = lcol = rcol = 0; + endif + endif endfunction @@ -505,35 +532,35 @@ function [ trow, brow, lcol, rcol ] = getusedrange_poi (xls, ii) - persistent cblnk; cblnk = java_get ('org.apache.poi.ss.usermodel.Cell', 'CELL_TYPE_BLANK'); + persistent cblnk; cblnk = java_get ('org.apache.poi.ss.usermodel.Cell', 'CELL_TYPE_BLANK'); - sh = xls.workbook.getSheetAt (ii-1); # Java POI starts counting at 0 + sh = xls.workbook.getSheetAt (ii-1); # Java POI starts counting at 0 - trow = sh.getFirstRowNum (); # 0-based - brow = sh.getLastRowNum (); # 0-based - # Get column range - lcol = 1048577; # OOXML (xlsx) max. + 1 - rcol = 0; - botrow = brow; - for jj=trow:brow - irow = sh.getRow (jj); - if (~isempty (irow)) - scol = (irow.getFirstCellNum).intValue (); - lcol = min (lcol, scol); - ecol = (irow.getLastCellNum).intValue () - 1; - rcol = max (rcol, ecol); - # Keep track of lowermost non-empty row as getLastRowNum() is unreliable - if ~(irow.getCell(scol).getCellType () == cblnk && irow.getCell(ecol).getCellType () == cblnk) - botrow = jj; - endif - endif - endfor - if (lcol > 1048576) - # Empty sheet - trow = 0; brow = 0; lcol = 0; rcol = 0; - else - brow = min (brow, botrow) + 1; ++trow; ++lcol; ++rcol; # 1-based return values - endif + trow = sh.getFirstRowNum (); # 0-based + brow = sh.getLastRowNum (); # 0-based + # Get column range + lcol = 1048577; # OOXML (xlsx) max. + 1 + rcol = 0; + botrow = brow; + for jj=trow:brow + irow = sh.getRow (jj); + if (~isempty (irow)) + scol = (irow.getFirstCellNum).intValue (); + lcol = min (lcol, scol); + ecol = (irow.getLastCellNum).intValue () - 1; + rcol = max (rcol, ecol); + # Keep track of lowermost non-empty row as getLastRowNum() is unreliable + if ~(irow.getCell(scol).getCellType () == cblnk && irow.getCell(ecol).getCellType () == cblnk) + botrow = jj; + endif + endif + endfor + if (lcol > 1048576) + # Empty sheet + trow = 0; brow = 0; lcol = 0; rcol = 0; + else + brow = min (brow, botrow) + 1; ++trow; ++lcol; ++rcol; # 1-based return values + endif endfunction @@ -561,33 +588,33 @@ function [ trow, brow, lcol, rcol ] = getusedrange_jxl (xls, wsh) - persistent emptycell = (java_get ('jxl.CellType', 'EMPTY')).toString (); + persistent emptycell = (java_get ('jxl.CellType', 'EMPTY')).toString (); - sh = xls.workbook.getSheet (wsh - 1); # JXL sheet count 0-based + sh = xls.workbook.getSheet (wsh - 1); # JXL sheet count 0-based - brow = sh.getRows (); - rcol = sh.getColumns (); - - if (brow == 0 || rcol == 0) - # Empty sheet - trow = 0; lcol = 0; brow = 0; rcol = 0; - else - trow = brow + 1; - lcol = rcol + 1; - for ii=0:brow-1 # For loop coz we must check ALL rows for leftmost column - emptyrow = 1; - jj = 0; - while (jj < rcol && emptyrow) # While loop => only til first non-empty cell - cell = sh.getCell (jj, ii); - if ~(strcmp (char (cell.getType ()), emptycell)) - lcol = min (lcol, jj + 1); - emptyrow = 0; - endif - ++jj; - endwhile - if ~(emptyrow) trow = min (trow, ii + 1); endif - endfor - endif + brow = sh.getRows (); + rcol = sh.getColumns (); + + if (brow == 0 || rcol == 0) + # Empty sheet + trow = 0; lcol = 0; brow = 0; rcol = 0; + else + trow = brow + 1; + lcol = rcol + 1; + for ii=0:brow-1 # For loop coz we must check ALL rows for leftmost column + emptyrow = 1; + jj = 0; + while (jj < rcol && emptyrow) # While loop => only til first non-empty cell + cell = sh.getCell (jj, ii); + if ~(strcmp (char (cell.getType ()), emptycell)) + lcol = min (lcol, jj + 1); + emptyrow = 0; + endif + ++jj; + endwhile + if ~(emptyrow) trow = min (trow, ii + 1); endif + endfor + endif endfunction @@ -616,18 +643,18 @@ function [ trow, brow, lcol, rcol ] = getusedrange_oxs (xls, wsh) - sh = xls.workbook.getWorkSheet (wsh - 1); - try - # Intriguing: sh.getFirst<> is off by one, sh.getLast<> = OK.... 8-Z - trow = sh.getFirstRow () + 1; - brow = sh.getLastRow (); - lcol = sh.getFirstCol () + 1; - rcol = sh.getLastCol (); - catch - # Might be an empty sheet - trow = brow = lcol = rcol = 0; - end_try_catch - # Check for empty sheet - if ((trow > brow) || (lcol > rcol)), trow = brow = lcol = rcol = 0; endif + sh = xls.workbook.getWorkSheet (wsh - 1); + try + # Intriguing: sh.getFirst<> is off by one, sh.getLast<> = OK.... 8-Z + trow = sh.getFirstRow () + 1; + brow = sh.getLastRow (); + lcol = sh.getFirstCol () + 1; + rcol = sh.getLastCol (); + catch + # Might be an empty sheet + trow = brow = lcol = rcol = 0; + end_try_catch + # Check for empty sheet + if ((trow > brow) || (lcol > rcol)), trow = brow = lcol = rcol = 0; endif endfunction This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <par...@us...> - 2012-04-18 16:20:40
|
Revision: 10276 http://octave.svn.sourceforge.net/octave/?rev=10276&view=rev Author: paramaniac Date: 2012-04-18 16:20:26 +0000 (Wed, 18 Apr 2012) Log Message: ----------- control-devel: add more test data from the DaISy collection Modified Paths: -------------- trunk/octave-forge/extra/control-devel/devel/PowerPlant.m trunk/octave-forge/extra/control-devel/devel/PowerPlantTest.m trunk/octave-forge/extra/control-devel/devel/ident.m Added Paths: ----------- trunk/octave-forge/extra/control-devel/devel/CD_player_arm-1.dat trunk/octave-forge/extra/control-devel/devel/CDplayer.m trunk/octave-forge/extra/control-devel/devel/Evaporator.m trunk/octave-forge/extra/control-devel/devel/evaporator.dat trunk/octave-forge/extra/control-devel/devel/pH.m trunk/octave-forge/extra/control-devel/devel/pHdata.dat Added: trunk/octave-forge/extra/control-devel/devel/CD_player_arm-1.dat =================================================================== --- trunk/octave-forge/extra/control-devel/devel/CD_player_arm-1.dat (rev 0) +++ trunk/octave-forge/extra/control-devel/devel/CD_player_arm-1.dat 2012-04-18 16:20:26 UTC (rev 10276) @@ -0,0 +1,2048 @@ + 5.3100000e-02 -3.1300000e-02 4.9500000e-02 3.4200000e-02 + 5.2600000e-02 -3.2800000e-02 5.2500000e-02 3.4200000e-02 + 5.0400000e-02 -4.8200000e-02 4.8500000e-02 5.6700000e-02 + 4.2300000e-02 -1.0480000e-01 2.8500000e-02 1.5420000e-01 + 2.6900000e-02 -1.5150000e-01 5.5500000e-02 1.1920000e-01 + 7.2000000e-03 -1.4040000e-01 6.3500000e-02 2.0670000e-01 + -9.1000000e-03 -9.3600000e-02 1.8850000e-01 -5.5800000e-02 + -2.7200000e-02 -7.7000000e-02 1.1450000e-01 2.2920000e-01 + -6.0200000e-02 -7.2000000e-02 9.8500000e-02 2.7670000e-01 + -9.6200000e-02 -1.0120000e-01 2.4850000e-01 -7.3300000e-02 + -1.2660000e-01 -2.7320000e-01 2.7050000e-01 3.0170000e-01 + -1.5480000e-01 -4.9990000e-01 3.6750000e-01 2.5670000e-01 + -1.8310000e-01 -6.8360000e-01 3.6650000e-01 3.4920000e-01 + -2.2250000e-01 -8.4770000e-01 3.1450000e-01 7.4920000e-01 + -2.6380000e-01 -9.5330000e-01 4.6150000e-01 4.0670000e-01 + -2.8650000e-01 -9.9260000e-01 5.0250000e-01 4.9170000e-01 + -2.8770000e-01 -9.5190000e-01 5.3550000e-01 5.9420000e-01 + -2.6520000e-01 -8.1000000e-01 5.8350000e-01 2.9170000e-01 + -2.2290000e-01 -6.5460000e-01 4.3550000e-01 4.4170000e-01 + -1.6900000e-01 -4.8020000e-01 3.1750000e-01 2.6670000e-01 + -1.0220000e-01 -3.1470000e-01 2.2650000e-01 1.0670000e-01 + -2.6200000e-02 -2.1810000e-01 1.6550000e-01 1.7170000e-01 + 5.0800000e-02 -1.2140000e-01 1.2950000e-01 1.6700000e-02 + 1.1810000e-01 2.7000000e-03 -3.7500000e-02 6.4200000e-02 + 1.6390000e-01 1.2900000e-01 -2.0150000e-01 7.6700000e-02 + 1.9150000e-01 2.4910000e-01 -2.4450000e-01 -9.3300000e-02 + 2.1410000e-01 3.5010000e-01 -2.0850000e-01 -1.8330000e-01 + 2.3830000e-01 4.3840000e-01 -2.0550000e-01 -2.0830000e-01 + 2.5910000e-01 5.3250000e-01 -2.9150000e-01 -1.5330000e-01 + 2.7200000e-01 6.5050000e-01 -3.7250000e-01 -2.1080000e-01 + 2.8550000e-01 7.9590000e-01 -3.9750000e-01 -4.0830000e-01 + 3.0360000e-01 9.8370000e-01 -4.5850000e-01 -4.2580000e-01 + 3.1800000e-01 1.2078000e+00 -5.1750000e-01 -4.1080000e-01 + 3.2780000e-01 1.4001000e+00 -4.4150000e-01 -6.9580000e-01 + 3.3330000e-01 1.5244000e+00 -4.4450000e-01 -7.1830000e-01 + 3.2010000e-01 1.6123000e+00 -6.0650000e-01 -4.6580000e-01 + 2.9200000e-01 1.6983000e+00 -5.6450000e-01 -8.1330000e-01 + 2.7200000e-01 1.7388000e+00 -3.8750000e-01 -1.0058000e+00 + 2.5560000e-01 1.6854000e+00 -3.7750000e-01 -6.2080000e-01 + 2.2790000e-01 1.5986000e+00 -4.1150000e-01 -6.7830000e-01 + 1.9540000e-01 1.4945000e+00 -4.2150000e-01 -7.8080000e-01 + 1.6670000e-01 1.3238000e+00 -3.4750000e-01 -6.4830000e-01 + 1.3840000e-01 1.0917000e+00 -2.9850000e-01 -5.0330000e-01 + 1.0390000e-01 8.5390000e-01 -2.9950000e-01 -3.0830000e-01 + 6.9700000e-02 6.4750000e-01 -1.1550000e-01 -4.4830000e-01 + 3.9100000e-02 4.2330000e-01 -3.1500000e-02 -2.0330000e-01 + 2.7000000e-03 2.2350000e-01 -7.7500000e-02 3.1700000e-02 + -3.3000000e-02 9.6600000e-02 1.5500000e-02 -2.4580000e-01 + -6.0600000e-02 -8.1700000e-02 1.1250000e-01 5.4200000e-02 + -8.2700000e-02 -3.0000000e-01 2.6850000e-01 1.2420000e-01 + -9.3900000e-02 -4.6750000e-01 2.8650000e-01 6.4200000e-02 + -9.5000000e-02 -5.8660000e-01 1.6850000e-01 3.7170000e-01 + -8.4000000e-02 -6.7020000e-01 2.7350000e-01 1.0170000e-01 + -6.1100000e-02 -7.6760000e-01 2.5050000e-01 2.8670000e-01 + -4.3200000e-02 -7.8910000e-01 1.2450000e-01 5.3420000e-01 + -2.8900000e-02 -6.7360000e-01 1.9450000e-01 8.4200000e-02 + -1.2600000e-02 -5.5160000e-01 1.8850000e-01 2.3920000e-01 + 3.0000000e-04 -4.0550000e-01 1.7950000e-01 1.9670000e-01 + 1.5900000e-02 -2.0970000e-01 1.6050000e-01 -1.2080000e-01 + 3.4800000e-02 -4.0800000e-02 9.2500000e-02 2.1700000e-02 + 5.0600000e-02 1.2080000e-01 1.3950000e-01 -1.4080000e-01 + 6.2700000e-02 3.0780000e-01 7.9500000e-02 -2.1830000e-01 + 7.2300000e-02 4.7730000e-01 1.7500000e-02 -3.1580000e-01 + 7.9200000e-02 5.0950000e-01 2.1500000e-02 -3.5330000e-01 + 7.5200000e-02 4.3140000e-01 8.5000000e-03 -1.5330000e-01 + 5.9000000e-02 4.0530000e-01 4.2500000e-02 -2.6830000e-01 + 3.7800000e-02 4.1740000e-01 2.4500000e-02 -2.6580000e-01 + 1.0300000e-02 4.4100000e-01 2.9500000e-02 -1.7830000e-01 + -2.5800000e-02 4.9400000e-01 9.0500000e-02 -2.6330000e-01 + -6.5200000e-02 4.8370000e-01 1.3850000e-01 -2.7580000e-01 + -1.0350000e-01 3.6110000e-01 1.8050000e-01 -2.2580000e-01 + -1.4290000e-01 1.3760000e-01 2.0350000e-01 -3.8300000e-02 + -1.8470000e-01 -2.2510000e-01 3.0950000e-01 1.6700000e-02 + -2.3400000e-01 -7.0170000e-01 3.2450000e-01 3.6920000e-01 + -3.0360000e-01 -1.1050000e+00 3.3550000e-01 7.5170000e-01 + -3.8270000e-01 -1.3696000e+00 5.9950000e-01 4.9170000e-01 + -4.5570000e-01 -1.6423000e+00 7.6550000e-01 7.0170000e-01 + -5.3090000e-01 -1.9082000e+00 7.9750000e-01 1.1367000e+00 + -6.0180000e-01 -2.0464000e+00 9.8050000e-01 8.3170000e-01 + -6.4580000e-01 -2.0844000e+00 1.1445000e+00 7.6920000e-01 + -6.6130000e-01 -2.0949000e+00 1.2125000e+00 9.2170000e-01 + -6.5890000e-01 -2.0794000e+00 1.1595000e+00 9.3170000e-01 + -6.3990000e-01 -1.9906000e+00 1.1525000e+00 7.9420000e-01 + -6.0090000e-01 -1.8632000e+00 1.1895000e+00 6.8670000e-01 + -5.4900000e-01 -1.7523000e+00 1.0765000e+00 7.6170000e-01 + -4.9120000e-01 -1.6356000e+00 9.6150000e-01 6.3420000e-01 + -4.2720000e-01 -1.5132000e+00 8.8450000e-01 5.8170000e-01 + -3.5670000e-01 -1.3945000e+00 8.2950000e-01 5.5170000e-01 + -2.7660000e-01 -1.3215000e+00 7.0850000e-01 4.3920000e-01 + -1.8680000e-01 -1.3317000e+00 5.1750000e-01 4.7920000e-01 + -9.7100000e-02 -1.3609000e+00 3.7650000e-01 5.3170000e-01 + -1.9200000e-02 -1.3473000e+00 2.1250000e-01 6.3670000e-01 + 4.6600000e-02 -1.2796000e+00 7.1500000e-02 5.1920000e-01 + 1.0890000e-01 -1.2096000e+00 -3.8500000e-02 4.1170000e-01 + 1.6440000e-01 -1.1582000e+00 -1.4250000e-01 5.7420000e-01 + 2.0560000e-01 -1.0522000e+00 -2.0150000e-01 4.5420000e-01 + 2.3310000e-01 -9.2160000e-01 -3.3050000e-01 3.8170000e-01 + 2.4780000e-01 -8.3300000e-01 -4.4850000e-01 4.1420000e-01 + 2.5180000e-01 -7.6130000e-01 -4.5450000e-01 3.0170000e-01 + 2.4700000e-01 -7.0810000e-01 -4.3150000e-01 2.8920000e-01 + 2.2760000e-01 -6.9600000e-01 -4.6050000e-01 3.4420000e-01 + 1.8650000e-01 -7.0760000e-01 -5.1550000e-01 3.6920000e-01 + 1.2530000e-01 -7.3960000e-01 -4.4850000e-01 3.2420000e-01 + 4.7200000e-02 -8.1460000e-01 -3.3750000e-01 4.2920000e-01 + -4.7300000e-02 -8.9610000e-01 -2.2350000e-01 4.9670000e-01 + -1.5210000e-01 -9.4360000e-01 -5.1500000e-02 4.6920000e-01 + -2.5770000e-01 -9.5160000e-01 1.2650000e-01 5.6670000e-01 + -3.4840000e-01 -8.7650000e-01 3.5750000e-01 3.6170000e-01 + -4.1030000e-01 -7.6320000e-01 4.9150000e-01 2.5420000e-01 + -4.5230000e-01 -6.8160000e-01 4.8250000e-01 4.6670000e-01 + -4.8350000e-01 -5.6940000e-01 5.7250000e-01 2.8920000e-01 + -4.9530000e-01 -4.0930000e-01 6.6650000e-01 1.4170000e-01 + -4.7860000e-01 -2.4180000e-01 7.0550000e-01 9.1700000e-02 + -4.3450000e-01 -8.2900000e-02 6.6150000e-01 1.9200000e-02 + -3.7190000e-01 5.6500000e-02 5.4550000e-01 6.1700000e-02 + -2.9490000e-01 2.0730000e-01 4.6550000e-01 -8.0800000e-02 + -2.0160000e-01 3.5660000e-01 3.2550000e-01 -1.4330000e-01 + -9.4600000e-02 3.9500000e-01 1.7650000e-01 -1.3830000e-01 + 1.8000000e-02 2.8030000e-01 3.2500000e-02 -1.0830000e-01 + 1.2390000e-01 1.1480000e-01 -1.2450000e-01 3.9200000e-02 + 2.1370000e-01 -3.5700000e-02 -2.7850000e-01 6.4200000e-02 + 2.8510000e-01 -1.7760000e-01 -4.5450000e-01 1.2670000e-01 + 3.3860000e-01 -2.8380000e-01 -5.1350000e-01 1.3920000e-01 + 3.7240000e-01 -3.7030000e-01 -5.3950000e-01 1.9920000e-01 + 3.8040000e-01 -4.2620000e-01 -5.9950000e-01 2.6920000e-01 + 3.6060000e-01 -3.8820000e-01 -6.2050000e-01 1.7170000e-01 + 3.1430000e-01 -2.6570000e-01 -6.0050000e-01 1.6670000e-01 + 2.4560000e-01 -4.5300000e-02 -4.9250000e-01 9.2000000e-03 + 1.6330000e-01 2.7260000e-01 -3.8350000e-01 -1.6830000e-01 + 7.5700000e-02 6.1400000e-01 -2.7050000e-01 -3.1830000e-01 + -8.8000000e-03 8.9540000e-01 -1.1750000e-01 -5.3330000e-01 + -8.2700000e-02 1.0590000e+00 -3.9500000e-02 -5.3580000e-01 + -1.3770000e-01 1.1857000e+00 5.4500000e-02 -7.4080000e-01 + -1.7070000e-01 1.3715000e+00 7.2500000e-02 -7.9330000e-01 + -1.9110000e-01 1.5865000e+00 6.9500000e-02 -7.7580000e-01 + -2.0270000e-01 1.7486000e+00 1.4450000e-01 -9.9330000e-01 + -2.0420000e-01 1.8322000e+00 1.2650000e-01 -8.7330000e-01 + -1.9010000e-01 1.9362000e+00 2.0650000e-01 -1.0933000e+00 + -1.5500000e-01 2.0756000e+00 2.1850000e-01 -1.2008000e+00 + -1.1500000e-01 2.2175000e+00 8.3500000e-02 -9.2580000e-01 + -7.8200000e-02 2.4161000e+00 1.2250000e-01 -1.3158000e+00 + -3.8200000e-02 2.5968000e+00 9.9500000e-02 -1.3508000e+00 + 9.0000000e-04 2.6974000e+00 6.8500000e-02 -1.2508000e+00 + 3.9200000e-02 2.7343000e+00 9.5500000e-02 -1.4683000e+00 + 7.5500000e-02 2.6634000e+00 1.6500000e-02 -1.2133000e+00 + 1.0760000e-01 2.5477000e+00 2.2500000e-02 -1.2458000e+00 + 1.4310000e-01 2.4412000e+00 -3.0500000e-02 -1.2558000e+00 + 1.8440000e-01 2.3062000e+00 -1.1650000e-01 -1.0908000e+00 + 2.2600000e-01 2.1947000e+00 -1.7550000e-01 -1.1083000e+00 + 2.5870000e-01 2.1622000e+00 -2.8350000e-01 -9.5080000e-01 + 2.7980000e-01 2.1829000e+00 -3.0550000e-01 -1.0508000e+00 + 2.9670000e-01 2.2071000e+00 -3.3750000e-01 -1.1083000e+00 + 3.1140000e-01 2.2195000e+00 -3.5150000e-01 -1.0408000e+00 + 3.2350000e-01 2.2042000e+00 -3.2950000e-01 -1.1133000e+00 + 3.3150000e-01 2.0932000e+00 -3.7750000e-01 -9.5830000e-01 + 3.3650000e-01 1.8795000e+00 -3.8150000e-01 -9.2330000e-01 + 3.4460000e-01 1.6517000e+00 -4.0250000e-01 -8.5830000e-01 + 3.5610000e-01 1.4464000e+00 -4.2850000e-01 -7.1830000e-01 + 3.6190000e-01 1.2298000e+00 -4.9950000e-01 -5.7080000e-01 + 3.5240000e-01 1.0610000e+00 -6.0350000e-01 -3.6830000e-01 + 3.3550000e-01 9.9130000e-01 -5.3750000e-01 -5.3830000e-01 + 3.2660000e-01 9.1090000e-01 -4.8350000e-01 -5.3580000e-01 + 3.2180000e-01 7.7310000e-01 -5.4150000e-01 -2.6830000e-01 + 3.1100000e-01 6.1490000e-01 -5.7150000e-01 -2.4080000e-01 + 2.9690000e-01 4.3680000e-01 -5.5250000e-01 -1.8830000e-01 + 2.8600000e-01 2.5250000e-01 -4.8250000e-01 -1.4830000e-01 + 2.7400000e-01 5.4600000e-02 -5.1150000e-01 7.6700000e-02 + 2.5210000e-01 -1.3000000e-01 -5.0750000e-01 2.2170000e-01 + 2.2610000e-01 -2.5710000e-01 -3.8050000e-01 1.3170000e-01 + 2.0650000e-01 -3.2380000e-01 -3.1550000e-01 1.8670000e-01 + 1.9310000e-01 -2.9870000e-01 -3.3050000e-01 1.9420000e-01 + 1.8080000e-01 -2.3290000e-01 -3.5650000e-01 2.0920000e-01 + 1.7280000e-01 -2.0600000e-01 -2.6550000e-01 1.1170000e-01 + 1.7780000e-01 -1.6960000e-01 -1.9350000e-01 4.2000000e-03 + 1.9330000e-01 -8.1400000e-02 -2.8050000e-01 1.2920000e-01 + 2.1360000e-01 4.0100000e-02 -3.1950000e-01 1.7000000e-03 + 2.4330000e-01 1.4800000e-01 -3.0150000e-01 -1.3080000e-01 + 2.8300000e-01 1.8640000e-01 -3.3950000e-01 -1.1830000e-01 + 3.2310000e-01 1.8010000e-01 -5.0950000e-01 -5.0800000e-02 + 3.5480000e-01 1.9850000e-01 -6.2550000e-01 -2.8300000e-02 + 3.8280000e-01 2.2120000e-01 -5.5050000e-01 -2.3580000e-01 + 4.0710000e-01 2.1300000e-01 -6.1850000e-01 -8.3300000e-02 + 4.1610000e-01 2.0780000e-01 -7.5050000e-01 -2.3300000e-02 + 4.0700000e-01 1.7290000e-01 -7.7350000e-01 -1.2080000e-01 + 3.8200000e-01 5.8000000e-02 -7.2550000e-01 8.9200000e-02 + 3.4720000e-01 -1.2450000e-01 -6.1950000e-01 4.9200000e-02 + 3.0910000e-01 -3.8830000e-01 -6.5450000e-01 2.6170000e-01 + 2.6640000e-01 -6.9030000e-01 -6.3550000e-01 5.4920000e-01 + 2.2620000e-01 -1.0013000e+00 -4.6550000e-01 4.7920000e-01 + 1.9300000e-01 -1.3467000e+00 -4.9250000e-01 8.6920000e-01 + 1.6360000e-01 -1.6417000e+00 -5.1750000e-01 9.7170000e-01 + 1.4270000e-01 -1.8525000e+00 -4.4150000e-01 9.0670000e-01 + 1.2660000e-01 -2.0179000e+00 -4.0150000e-01 1.2292000e+00 + 1.1180000e-01 -2.1203000e+00 -3.4850000e-01 1.0842000e+00 + 1.0180000e-01 -2.1909000e+00 -3.8450000e-01 1.0817000e+00 + 9.1200000e-02 -2.2222000e+00 -3.6350000e-01 1.2492000e+00 + 7.7400000e-02 -2.1564000e+00 -2.1150000e-01 9.8920000e-01 + 6.1400000e-02 -2.0300000e+00 -1.9950000e-01 1.0467000e+00 + 4.3800000e-02 -1.8759000e+00 -1.5950000e-01 9.5170000e-01 + 3.8500000e-02 -1.7096000e+00 1.5500000e-02 5.3670000e-01 + 4.5700000e-02 -1.5773000e+00 4.5500000e-02 6.7420000e-01 + 4.6100000e-02 -1.4479000e+00 -4.1500000e-02 7.2420000e-01 + 3.7100000e-02 -1.2867000e+00 -3.2500000e-02 3.8420000e-01 + 2.5900000e-02 -1.1849000e+00 4.4500000e-02 4.1420000e-01 + 1.3300000e-02 -1.1751000e+00 1.4850000e-01 4.0920000e-01 + -2.3000000e-03 -1.1735000e+00 1.2550000e-01 3.9920000e-01 + -2.3400000e-02 -1.1757000e+00 7.0500000e-02 5.4920000e-01 + -4.2700000e-02 -1.2288000e+00 1.8250000e-01 3.6420000e-01 + -5.4600000e-02 -1.3379000e+00 1.5450000e-01 5.3670000e-01 + -6.9300000e-02 -1.4457000e+00 3.8500000e-02 8.0920000e-01 + -8.6200000e-02 -1.4768000e+00 9.6500000e-02 6.0670000e-01 + -9.6000000e-02 -1.4632000e+00 1.6350000e-01 6.5420000e-01 + -1.0130000e-01 -1.4416000e+00 1.4450000e-01 7.1170000e-01 + -1.0980000e-01 -1.3817000e+00 5.5500000e-02 6.4170000e-01 + -1.3070000e-01 -1.2943000e+00 3.0500000e-02 7.0670000e-01 + -1.6870000e-01 -1.1853000e+00 1.5850000e-01 6.0170000e-01 + -2.2030000e-01 -1.0350000e+00 2.5050000e-01 5.3170000e-01 + -2.8050000e-01 -8.1970000e-01 3.1750000e-01 4.5420000e-01 + -3.4270000e-01 -5.3620000e-01 4.5450000e-01 3.0670000e-01 + -3.9500000e-01 -2.7830000e-01 6.2450000e-01 1.2170000e-01 + -4.2570000e-01 -1.2650000e-01 6.7450000e-01 -8.3000000e-03 + -4.3470000e-01 -3.5200000e-02 6.1150000e-01 6.4200000e-02 + -4.2730000e-01 8.4900000e-02 6.4550000e-01 -6.0800000e-02 + -4.0800000e-01 2.6690000e-01 6.3750000e-01 -9.8300000e-02 + -3.8080000e-01 4.5930000e-01 5.5950000e-01 -1.1830000e-01 + -3.3780000e-01 6.0350000e-01 5.4650000e-01 -4.1580000e-01 + -2.7760000e-01 6.9560000e-01 4.8950000e-01 -3.2330000e-01 + -2.1390000e-01 7.7670000e-01 4.1450000e-01 -2.4830000e-01 + -1.4850000e-01 8.7590000e-01 3.1050000e-01 -5.0330000e-01 + -7.9800000e-02 9.4960000e-01 1.4650000e-01 -4.0330000e-01 + -1.3800000e-02 9.8670000e-01 1.0650000e-01 -4.1330000e-01 + 4.8100000e-02 1.0353000e+00 8.2500000e-02 -5.4580000e-01 + 1.0140000e-01 1.0584000e+00 -2.8500000e-02 -3.9580000e-01 + 1.4170000e-01 1.0195000e+00 -1.2450000e-01 -3.5080000e-01 + 1.8100000e-01 9.6430000e-01 -1.1750000e-01 -5.0580000e-01 + 2.3040000e-01 8.9870000e-01 -1.3250000e-01 -4.6330000e-01 + 2.7840000e-01 8.2230000e-01 -3.1550000e-01 -1.8330000e-01 + 3.1580000e-01 7.7410000e-01 -4.1650000e-01 -3.0580000e-01 + 3.4770000e-01 7.2410000e-01 -4.4750000e-01 -3.6080000e-01 + 3.7000000e-01 6.1950000e-01 -5.5150000e-01 -4.5800000e-02 + 3.8090000e-01 5.1390000e-01 -5.9050000e-01 -1.6330000e-01 + 3.8960000e-01 4.4720000e-01 -5.8850000e-01 -1.9830000e-01 + 3.9350000e-01 3.6970000e-01 -5.9850000e-01 4.1700000e-02 + 3.8790000e-01 3.2960000e-01 -6.3350000e-01 -3.0800000e-02 + 3.7810000e-01 3.8440000e-01 -6.7950000e-01 -1.1830000e-01 + 3.6610000e-01 4.7410000e-01 -6.5550000e-01 -9.0800000e-02 + 3.4930000e-01 6.0390000e-01 -5.8050000e-01 -2.3580000e-01 + 3.2400000e-01 7.0040000e-01 -5.6350000e-01 -2.5330000e-01 + 2.8580000e-01 6.1890000e-01 -5.7850000e-01 -9.3300000e-02 + 2.4320000e-01 4.4270000e-01 -4.4350000e-01 -2.3830000e-01 + 2.0740000e-01 2.3540000e-01 -3.3550000e-01 -1.4580000e-01 + 1.6720000e-01 1.2800000e-02 -4.0750000e-01 2.9670000e-01 + 1.1830000e-01 -1.0600000e-01 -3.2750000e-01 7.6700000e-02 + 7.2000000e-02 -1.5690000e-01 -2.1850000e-01 7.9200000e-02 + 2.8100000e-02 -1.8370000e-01 -1.7550000e-01 2.9420000e-01 + -1.1000000e-02 -1.4650000e-01 -9.6500000e-02 9.2000000e-03 + -4.3000000e-02 -1.1240000e-01 -1.0350000e-01 1.8920000e-01 + -6.9400000e-02 -9.0700000e-02 3.4500000e-02 1.2670000e-01 + -8.2200000e-02 -4.0200000e-02 1.3950000e-01 -8.8300000e-02 + -8.4000000e-02 3.6600000e-02 5.4500000e-02 1.2670000e-01 + -8.1300000e-02 1.0440000e-01 1.1250000e-01 -7.5800000e-02 + -7.4400000e-02 9.3600000e-02 1.6150000e-01 -7.8300000e-02 + -7.3600000e-02 5.7900000e-02 1.2150000e-01 1.4420000e-01 + -8.0900000e-02 5.4600000e-02 1.4450000e-01 -4.5800000e-02 + -8.6900000e-02 4.0200000e-02 1.6650000e-01 -3.3000000e-03 + -8.8200000e-02 2.5000000e-03 2.5850000e-01 1.6700000e-02 + -8.9100000e-02 -8.9300000e-02 2.3350000e-01 6.1700000e-02 + -9.8900000e-02 -2.0160000e-01 1.0950000e-01 2.5670000e-01 + -1.1570000e-01 -2.8980000e-01 1.7550000e-01 1.5170000e-01 + -1.2790000e-01 -4.2030000e-01 2.5050000e-01 2.1920000e-01 + -1.3210000e-01 -5.5230000e-01 2.4250000e-01 2.8920000e-01 + -1.3530000e-01 -6.3800000e-01 1.5150000e-01 3.8920000e-01 + -1.4510000e-01 -7.2660000e-01 9.5500000e-02 5.4920000e-01 + -1.5170000e-01 -8.0320000e-01 1.7750000e-01 3.5170000e-01 + -1.4020000e-01 -8.4440000e-01 1.4450000e-01 4.2170000e-01 + -1.1030000e-01 -8.4730000e-01 8.2500000e-02 4.4670000e-01 + -6.7700000e-02 -8.7110000e-01 7.2500000e-02 3.3420000e-01 + -2.8600000e-02 -9.4690000e-01 -8.0500000e-02 6.8420000e-01 + 2.3000000e-03 -9.5790000e-01 -1.2450000e-01 4.2420000e-01 + 3.8100000e-02 -9.4790000e-01 -1.1350000e-01 2.1170000e-01 + 6.6400000e-02 -9.9930000e-01 -2.0650000e-01 7.2170000e-01 + 7.4200000e-02 -1.0048000e+00 -1.3650000e-01 4.6420000e-01 + 7.3500000e-02 -1.0174000e+00 -9.4500000e-02 2.8170000e-01 + 6.1900000e-02 -1.1243000e+00 -1.8550000e-01 6.6920000e-01 + 3.3900000e-02 -1.2704000e+00 -1.2350000e-01 5.0670000e-01 + -4.1000000e-03 -1.4761000e+00 -4.7500000e-02 6.2920000e-01 + -5.1200000e-02 -1.6788000e+00 2.1500000e-02 8.9920000e-01 + -9.7300000e-02 -1.7716000e+00 1.6450000e-01 6.4670000e-01 + -1.3410000e-01 -1.8061000e+00 1.8350000e-01 7.9420000e-01 + -1.6950000e-01 -1.7935000e+00 1.6650000e-01 9.7170000e-01 + -1.9880000e-01 -1.7171000e+00 2.6750000e-01 6.5170000e-01 + -2.1070000e-01 -1.6368000e+00 3.2850000e-01 6.4170000e-01 + -2.1190000e-01 -1.5489000e+00 3.3750000e-01 7.2670000e-01 + -2.1230000e-01 -1.4181000e+00 3.6150000e-01 5.6170000e-01 + -2.1720000e-01 -1.2714000e+00 3.4550000e-01 5.3420000e-01 + -2.3190000e-01 -1.0671000e+00 3.3350000e-01 4.8170000e-01 + -2.5580000e-01 -7.1230000e-01 3.6650000e-01 2.4670000e-01 + -2.8380000e-01 -2.6690000e-01 4.3850000e-01 5.1700000e-02 + -3.1230000e-01 1.5310000e-01 5.1950000e-01 -1.4830000e-01 + -3.3900000e-01 5.2260000e-01 5.2150000e-01 -3.0080000e-01 + -3.5760000e-01 8.5550000e-01 4.9850000e-01 -4.8080000e-01 + -3.5830000e-01 1.1684000e+00 5.3450000e-01 -7.2330000e-01 + -3.4360000e-01 1.4304000e+00 5.0850000e-01 -6.8830000e-01 + -3.2330000e-01 1.6427000e+00 4.6250000e-01 -7.4830000e-01 + -2.9320000e-01 1.8196000e+00 4.6850000e-01 -1.0258000e+00 + -2.5340000e-01 1.8815000e+00 3.8350000e-01 -8.9330000e-01 + -2.1640000e-01 1.8872000e+00 2.7950000e-01 -7.8830000e-01 + -1.8160000e-01 1.9679000e+00 2.6950000e-01 -9.9830000e-01 + -1.4230000e-01 2.0907000e+00 2.4850000e-01 -1.0408000e+00 + -1.0810000e-01 2.2150000e+00 1.7150000e-01 -9.9330000e-01 + -9.2300000e-02 2.2823000e+00 7.8500000e-02 -9.8830000e-01 + -9.2600000e-02 2.2505000e+00 8.6500000e-02 -1.0533000e+00 + -9.7400000e-02 2.2151000e+00 1.8150000e-01 -1.1133000e+00 + -1.0330000e-01 2.1746000e+00 2.1050000e-01 -1.0133000e+00 + -1.1300000e-01 2.0369000e+00 1.8950000e-01 -9.6830000e-01 + -1.2610000e-01 1.8613000e+00 1.9050000e-01 -8.8580000e-01 + -1.3770000e-01 1.7249000e+00 2.1850000e-01 -8.3580000e-01 + -1.4030000e-01 1.5793000e+00 2.2850000e-01 -8.2080000e-01 + -1.3100000e-01 1.4183000e+00 2.3450000e-01 -7.6830000e-01 + -1.1800000e-01 1.2871000e+00 2.1650000e-01 -6.1330000e-01 + -1.1020000e-01 1.1936000e+00 1.9550000e-01 -5.3830000e-01 + -1.0150000e-01 1.1864000e+00 2.0750000e-01 -7.2830000e-01 + -8.8600000e-02 1.2592000e+00 1.2750000e-01 -5.8330000e-01 + -7.4900000e-02 1.3410000e+00 1.4850000e-01 -5.6580000e-01 + -4.7000000e-02 1.4143000e+00 2.8950000e-01 -9.4580000e-01 + -3.1000000e-03 1.4604000e+00 1.4650000e-01 -6.7330000e-01 + 4.0200000e-02 1.5447000e+00 -4.3500000e-02 -6.0830000e-01 + 8.7600000e-02 1.6959000e+00 -6.4500000e-02 -1.0383000e+00 + 1.4120000e-01 1.7869000e+00 -1.5250000e-01 -8.0830000e-01 + 1.8830000e-01 1.8245000e+00 -2.2550000e-01 -8.2080000e-01 + 2.2520000e-01 1.8679000e+00 -3.2750000e-01 -9.9330000e-01 + 2.4670000e-01 1.9045000e+00 -4.3950000e-01 -8.2080000e-01 + 2.4690000e-01 1.9533000e+00 -4.5650000e-01 -9.0580000e-01 + 2.3010000e-01 1.9731000e+00 -5.1350000e-01 -9.3080000e-01 + 2.0340000e-01 1.9264000e+00 -4.8650000e-01 -9.2330000e-01 + 1.6790000e-01 1.8261000e+00 -4.1250000e-01 -8.4580000e-01 + 1.1910000e-01 1.7087000e+00 -3.9750000e-01 -7.0830000e-01 + 5.7800000e-02 1.6395000e+00 -3.7650000e-01 -7.7580000e-01 + -1.2000000e-02 1.5785000e+00 -3.3850000e-01 -6.7080000e-01 + -8.6000000e-02 1.4653000e+00 -1.9250000e-01 -6.0080000e-01 + -1.5150000e-01 1.3092000e+00 1.3500000e-02 -6.9580000e-01 + -2.0080000e-01 1.0958000e+00 9.8500000e-02 -5.5830000e-01 + -2.4180000e-01 8.4230000e-01 7.9500000e-02 -3.2580000e-01 + -2.7930000e-01 5.8980000e-01 1.1150000e-01 -2.9080000e-01 + -3.0530000e-01 3.0630000e-01 2.4450000e-01 -3.2080000e-01 + -3.2320000e-01 -4.0200000e-02 2.7450000e-01 4.6700000e-02 + -3.4600000e-01 -3.6420000e-01 2.8350000e-01 3.3170000e-01 + -3.6020000e-01 -6.4860000e-01 4.8450000e-01 7.6700000e-02 + -3.5100000e-01 -1.0138000e+00 5.6250000e-01 3.0670000e-01 + -3.3650000e-01 -1.3782000e+00 4.0350000e-01 8.0920000e-01 + -3.2850000e-01 -1.6311000e+00 3.7750000e-01 7.1920000e-01 + -3.1770000e-01 -1.8760000e+00 4.7850000e-01 7.7420000e-01 + -3.0250000e-01 -2.0846000e+00 5.2750000e-01 1.0067000e+00 + -2.8610000e-01 -2.1696000e+00 4.7450000e-01 1.0042000e+00 + -2.6320000e-01 -2.1988000e+00 4.3850000e-01 9.7420000e-01 + -2.2800000e-01 -2.2098000e+00 4.7050000e-01 9.5670000e-01 + -1.8350000e-01 -2.2121000e+00 3.8350000e-01 1.0492000e+00 + -1.3430000e-01 -2.2346000e+00 2.3650000e-01 1.0167000e+00 + -7.9900000e-02 -2.2940000e+00 2.0050000e-01 9.2670000e-01 + -2.9600000e-02 -2.4018000e+00 1.4850000e-01 1.1567000e+00 + 5.4000000e-03 -2.5377000e+00 2.6500000e-02 1.2892000e+00 + 3.7900000e-02 -2.6953000e+00 -2.0500000e-02 1.1017000e+00 + 8.5000000e-02 -2.8762000e+00 -1.5500000e-02 1.1667000e+00 + 1.3650000e-01 -3.0209000e+00 -1.0450000e-01 1.4792000e+00 + 1.7580000e-01 -3.0638000e+00 -2.8650000e-01 1.4992000e+00 + 2.0690000e-01 -3.0199000e+00 -3.9750000e-01 1.3217000e+00 + 2.3990000e-01 -2.9711000e+00 -3.7850000e-01 1.2517000e+00 + 2.6870000e-01 -2.9543000e+00 -4.1250000e-01 1.3817000e+00 + 2.8130000e-01 -2.9447000e+00 -4.6150000e-01 1.3142000e+00 + 2.7370000e-01 -2.9591000e+00 -4.5750000e-01 1.2217000e+00 + 2.3850000e-01 -3.0112000e+00 -4.5850000e-01 1.4592000e+00 + 1.7780000e-01 -3.0317000e+00 -3.5350000e-01 1.3667000e+00 + 1.1150000e-01 -2.9655000e+00 -1.8050000e-01 1.1367000e+00 + 4.6900000e-02 -2.8414000e+00 -5.3500000e-02 1.2642000e+00 + -2.5400000e-02 -2.7009000e+00 3.0500000e-02 1.2717000e+00 + -1.0490000e-01 -2.5296000e+00 6.6500000e-02 1.1567000e+00 + -1.7490000e-01 -2.2903000e+00 2.0050000e-01 8.8420000e-01 + -2.2610000e-01 -2.0294000e+00 3.4850000e-01 7.6920000e-01 + -2.7090000e-01 -1.8409000e+00 3.9650000e-01 9.2170000e-01 + -3.1600000e-01 -1.7059000e+00 4.9250000e-01 6.5920000e-01 + -3.5530000e-01 -1.5587000e+00 5.6450000e-01 5.5420000e-01 + -3.8870000e-01 -1.4311000e+00 6.0650000e-01 6.4670000e-01 + -4.1320000e-01 -1.3691000e+00 6.9150000e-01 4.7170000e-01 + -4.2020000e-01 -1.3607000e+00 7.4650000e-01 4.9920000e-01 + -4.0790000e-01 -1.3743000e+00 8.1650000e-01 5.2420000e-01 + -3.7900000e-01 -1.3781000e+00 7.8850000e-01 4.8920000e-01 + -3.3930000e-01 -1.3442000e+00 6.3550000e-01 5.7920000e-01 + -2.9250000e-01 -1.2459000e+00 5.5550000e-01 4.8170000e-01 + -2.3780000e-01 -1.1148000e+00 5.6950000e-01 3.4670000e-01 + -1.8560000e-01 -9.9310000e-01 4.8250000e-01 4.6670000e-01 + -1.4860000e-01 -8.1850000e-01 3.8050000e-01 3.7670000e-01 + -1.2160000e-01 -5.8740000e-01 3.8850000e-01 7.1700000e-02 + -1.0150000e-01 -3.8210000e-01 3.2350000e-01 1.6670000e-01 + -8.9800000e-02 -1.7780000e-01 2.8550000e-01 6.6700000e-02 + -7.1200000e-02 3.4600000e-02 3.3550000e-01 -2.8580000e-01 + -3.7900000e-02 2.0850000e-01 3.1750000e-01 -2.4830000e-01 + -2.7000000e-03 3.7720000e-01 2.0650000e-01 -2.3330000e-01 + 2.3600000e-02 5.6550000e-01 1.7500000e-02 -3.4580000e-01 + 4.3800000e-02 7.3290000e-01 -4.4500000e-02 -4.7330000e-01 + 6.3500000e-02 8.2530000e-01 2.2500000e-02 -5.4330000e-01 + 8.0100000e-02 8.6490000e-01 4.5000000e-03 -4.6330000e-01 + 9.0300000e-02 9.3080000e-01 -1.1500000e-02 -6.1330000e-01 + 9.0100000e-02 1.0208000e+00 -8.7500000e-02 -5.2580000e-01 + 7.4400000e-02 1.1279000e+00 -1.1850000e-01 -4.9330000e-01 + 5.5800000e-02 1.2299000e+00 -1.1500000e-02 -8.2330000e-01 + 4.0800000e-02 1.2587000e+00 -5.0000000e-04 -6.2330000e-01 + 1.9100000e-02 1.2574000e+00 3.8500000e-02 -5.4330000e-01 + -6.3000000e-03 1.2484000e+00 7.8500000e-02 -7.1580000e-01 + -2.5500000e-02 1.1921000e+00 2.0500000e-02 -5.9330000e-01 + -3.3600000e-02 1.1108000e+00 4.2500000e-02 -6.8080000e-01 + -3.5700000e-02 9.9840000e-01 1.3500000e-02 -4.8830000e-01 + -4.1500000e-02 8.9080000e-01 1.5500000e-02 -3.5830000e-01 + -4.1600000e-02 8.4480000e-01 9.6500000e-02 -6.1580000e-01 + -2.9100000e-02 8.0260000e-01 2.6500000e-02 -4.2330000e-01 + -1.3500000e-02 7.5600000e-01 -5.2500000e-02 -2.9580000e-01 + 6.4000000e-03 7.4060000e-01 -1.9500000e-02 -4.9580000e-01 + 3.4700000e-02 7.3670000e-01 -1.6500000e-02 -4.2080000e-01 + 6.3300000e-02 7.9390000e-01 -9.4500000e-02 -3.2330000e-01 + 9.1200000e-02 9.5790000e-01 -1.1950000e-01 -5.6580000e-01 + 1.2250000e-01 1.1168000e+00 -1.2150000e-01 -6.2830000e-01 + 1.4800000e-01 1.1866000e+00 -2.0550000e-01 -4.5080000e-01 + 1.6620000e-01 1.2186000e+00 -1.8750000e-01 -7.0830000e-01 + 1.8510000e-01 1.2276000e+00 -2.0650000e-01 -7.0580000e-01 + 1.9960000e-01 1.2388000e+00 -2.6050000e-01 -4.6330000e-01 + 2.1310000e-01 1.3063000e+00 -2.1950000e-01 -7.8580000e-01 + 2.3230000e-01 1.3793000e+00 -3.4850000e-01 -6.3330000e-01 + 2.5580000e-01 1.4242000e+00 -3.9750000e-01 -6.0830000e-01 + 2.9370000e-01 1.4094000e+00 -3.5550000e-01 -9.1330000e-01 + 3.3920000e-01 1.2810000e+00 -5.4750000e-01 -4.5830000e-01 + 3.7570000e-01 1.1218000e+00 -6.7450000e-01 -4.4830000e-01 + 4.1030000e-01 9.7460000e-01 -7.2250000e-01 -6.5080000e-01 + 4.4410000e-01 8.0900000e-01 -8.0850000e-01 -2.8080000e-01 + 4.7100000e-01 6.6120000e-01 -8.1950000e-01 -3.2580000e-01 + 4.9310000e-01 5.2910000e-01 -8.9750000e-01 -3.2080000e-01 + 5.0520000e-01 4.5000000e-01 -9.7350000e-01 -1.6080000e-01 + 4.9690000e-01 4.8250000e-01 -1.0065000e+00 -2.0580000e-01 + 4.6400000e-01 5.5710000e-01 -1.0395000e+00 -1.7830000e-01 + 4.1340000e-01 6.0070000e-01 -9.2250000e-01 -3.3580000e-01 + 3.5250000e-01 5.6950000e-01 -7.7050000e-01 -2.7330000e-01 + 2.8080000e-01 4.7080000e-01 -6.6250000e-01 -1.6830000e-01 + 2.0380000e-01 3.8500000e-01 -5.8250000e-01 -2.3830000e-01 + 1.3300000e-01 3.3290000e-01 -4.9050000e-01 -1.8080000e-01 + 8.0000000e-02 2.9640000e-01 -3.3150000e-01 -2.7830000e-01 + 4.9900000e-02 2.1540000e-01 -2.5850000e-01 -2.1580000e-01 + 3.5600000e-02 5.0100000e-02 -2.9450000e-01 1.7000000e-03 + 3.4500000e-02 -1.2250000e-01 -2.4250000e-01 -1.6330000e-01 + 4.2400000e-02 -2.9630000e-01 -2.5550000e-01 4.1700000e-02 + 4.5400000e-02 -4.3290000e-01 -3.1850000e-01 2.4670000e-01 + 4.5900000e-02 -4.0410000e-01 -2.4550000e-01 -4.0800000e-02 + 5.0100000e-02 -2.7960000e-01 -1.7850000e-01 8.6700000e-02 + 5.6200000e-02 -1.3940000e-01 -1.2450000e-01 3.9200000e-02 + 7.0800000e-02 2.6000000e-03 -1.0950000e-01 -2.2330000e-01 + 9.2100000e-02 1.0000000e-01 -2.2350000e-01 2.4200000e-02 + 1.1730000e-01 2.7550000e-01 -1.9850000e-01 -2.2080000e-01 + 1.5740000e-01 5.5620000e-01 -1.5050000e-01 -5.5580000e-01 + 2.0340000e-01 7.6630000e-01 -3.0050000e-01 -3.2330000e-01 + 2.3450000e-01 8.6960000e-01 -3.9950000e-01 -4.5080000e-01 + 2.4660000e-01 8.6810000e-01 -4.3050000e-01 -5.1830000e-01 + 2.4260000e-01 8.1350000e-01 -4.3650000e-01 -4.0330000e-01 + 2.2940000e-01 8.3750000e-01 -3.9550000e-01 -5.3830000e-01 + 2.1170000e-01 9.1950000e-01 -3.8650000e-01 -4.6330000e-01 + 1.8890000e-01 1.0417000e+00 -3.4150000e-01 -5.2580000e-01 + 1.6150000e-01 1.2338000e+00 -3.4150000e-01 -6.7580000e-01 + 1.2600000e-01 1.4168000e+00 -4.0650000e-01 -6.5080000e-01 + 8.1000000e-02 1.5369000e+00 -3.5050000e-01 -7.7080000e-01 + 3.4200000e-02 1.5810000e+00 -1.6150000e-01 -8.5580000e-01 + -9.1000000e-03 1.5314000e+00 -2.2500000e-02 -8.0830000e-01 + -5.0300000e-02 1.4241000e+00 -2.8500000e-02 -7.2830000e-01 + -8.7600000e-02 1.2739000e+00 4.5000000e-03 -7.2080000e-01 + -1.1410000e-01 1.0825000e+00 9.6500000e-02 -7.0080000e-01 + -1.3080000e-01 9.1300000e-01 1.3450000e-01 -5.6080000e-01 + -1.4460000e-01 7.9450000e-01 1.3850000e-01 -5.1080000e-01 + -1.6080000e-01 7.1830000e-01 1.4250000e-01 -4.8330000e-01 + -1.8460000e-01 7.1850000e-01 1.8550000e-01 -4.5080000e-01 + -2.1690000e-01 7.9080000e-01 2.3550000e-01 -5.1330000e-01 + -2.5020000e-01 8.5770000e-01 2.9850000e-01 -5.8330000e-01 + -2.7470000e-01 8.5710000e-01 4.5050000e-01 -6.6330000e-01 + -2.9110000e-01 7.9650000e-01 5.1450000e-01 -5.3580000e-01 + -3.0550000e-01 7.0700000e-01 5.1250000e-01 -5.0080000e-01 + -3.1530000e-01 5.4600000e-01 5.2050000e-01 -5.5830000e-01 + -3.2420000e-01 2.9870000e-01 4.8750000e-01 -2.3830000e-01 + -3.3920000e-01 7.0600000e-02 5.7950000e-01 -1.5830000e-01 + -3.5280000e-01 -7.1000000e-02 6.8750000e-01 -2.4330000e-01 + -3.6490000e-01 -1.7590000e-01 6.4850000e-01 2.1700000e-02 + -3.8270000e-01 -3.1880000e-01 6.3350000e-01 1.1420000e-01 + -3.9870000e-01 -5.0330000e-01 7.0050000e-01 1.4200000e-02 + -4.0610000e-01 -6.9320000e-01 7.1850000e-01 2.1920000e-01 + -4.1070000e-01 -8.7360000e-01 7.0150000e-01 4.3170000e-01 + -4.0890000e-01 -1.0089000e+00 7.3950000e-01 3.1920000e-01 + -3.9420000e-01 -1.1045000e+00 7.0750000e-01 4.1670000e-01 + -3.7380000e-01 -1.2074000e+00 5.8350000e-01 6.1920000e-01 + -3.4900000e-01 -1.3199000e+00 5.0750000e-01 5.0670000e-01 + -3.1250000e-01 -1.4543000e+00 4.7850000e-01 5.4920000e-01 + -2.6850000e-01 -1.5904000e+00 4.4250000e-01 6.6670000e-01 + -2.3240000e-01 -1.6779000e+00 2.8050000e-01 7.6670000e-01 + -2.1770000e-01 -1.7222000e+00 1.2150000e-01 8.8170000e-01 + -2.1770000e-01 -1.7124000e+00 2.0350000e-01 6.5170000e-01 + -2.1910000e-01 -1.6440000e+00 2.9450000e-01 6.0170000e-01 + -2.2620000e-01 -1.5442000e+00 2.7250000e-01 7.3420000e-01 + -2.4460000e-01 -1.4283000e+00 2.7250000e-01 5.9670000e-01 + -2.6750000e-01 -1.3620000e+00 3.1450000e-01 5.3920000e-01 + -2.8520000e-01 -1.3847000e+00 3.8150000e-01 5.2420000e-01 + -2.9150000e-01 -1.4221000e+00 3.8850000e-01 5.4420000e-01 + -2.8590000e-01 -1.4241000e+00 3.9550000e-01 6.1420000e-01 + -2.6620000e-01 -1.4117000e+00 4.3450000e-01 5.8170000e-01 + -2.2610000e-01 -1.4121000e+00 3.7950000e-01 5.0920000e-01 + -1.6810000e-01 -1.4674000e+00 1.8750000e-01 5.9670000e-01 + -1.0670000e-01 -1.5856000e+00 2.5000000e-03 7.9670000e-01 + -4.8400000e-02 -1.7123000e+00 1.0500000e-02 7.0170000e-01 + 5.5000000e-03 -1.8149000e+00 -2.7500000e-02 7.8920000e-01 + 4.4100000e-02 -1.8852000e+00 -1.7550000e-01 1.0267000e+00 + 6.6200000e-02 -1.9856000e+00 -1.7750000e-01 8.4170000e-01 + 7.6900000e-02 -2.2193000e+00 -1.2350000e-01 1.0092000e+00 + 6.9000000e-02 -2.4788000e+00 -1.0950000e-01 1.2917000e+00 + 4.3300000e-02 -2.5547000e+00 -1.0750000e-01 1.1892000e+00 + 1.2100000e-02 -2.4502000e+00 -5.1500000e-02 1.1292000e+00 + -1.6300000e-02 -2.3174000e+00 6.9500000e-02 1.0167000e+00 + -4.3100000e-02 -2.2535000e+00 3.5500000e-02 1.0567000e+00 + -6.9000000e-02 -2.2237000e+00 -8.5000000e-03 1.0267000e+00 + -8.3000000e-02 -2.1826000e+00 9.0500000e-02 8.2170000e-01 + -8.0200000e-02 -2.1610000e+00 1.2450000e-01 9.7170000e-01 + -6.4400000e-02 -2.1314000e+00 8.9500000e-02 8.9420000e-01 + -3.8900000e-02 -2.0083000e+00 -2.3500000e-02 7.7670000e-01 + -1.4400000e-02 -1.7807000e+00 -9.2500000e-02 8.1170000e-01 + 3.9000000e-03 -1.5045000e+00 -5.5500000e-02 5.1670000e-01 + 1.8100000e-02 -1.2185000e+00 -9.7500000e-02 3.9670000e-01 + 2.5700000e-02 -9.1350000e-01 -1.0550000e-01 2.9170000e-01 + 2.5300000e-02 -5.9010000e-01 -4.0500000e-02 1.9200000e-02 + 1.1900000e-02 -2.8040000e-01 -4.0500000e-02 -2.0800000e-02 + -2.2300000e-02 2.8400000e-02 -5.2500000e-02 -1.1830000e-01 + -7.2200000e-02 3.6680000e-01 3.7500000e-02 -3.6580000e-01 + -1.2480000e-01 6.9310000e-01 2.1850000e-01 -5.4330000e-01 + -1.7620000e-01 9.8260000e-01 3.2550000e-01 -5.9830000e-01 + -2.2790000e-01 1.2387000e+00 3.5050000e-01 -7.4080000e-01 + -2.8010000e-01 1.4081000e+00 3.5950000e-01 -7.7830000e-01 + -3.3130000e-01 1.4824000e+00 4.3850000e-01 -7.6330000e-01 + -3.7140000e-01 1.4586000e+00 5.7050000e-01 -8.4830000e-01 + -3.9400000e-01 1.3294000e+00 5.9150000e-01 -6.9080000e-01 + -4.0580000e-01 1.2356000e+00 5.9150000e-01 -5.7330000e-01 + -4.1240000e-01 1.2560000e+00 5.9650000e-01 -6.1080000e-01 + -4.1230000e-01 1.3012000e+00 5.4050000e-01 -5.9080000e-01 + -3.9880000e-01 1.2608000e+00 5.5350000e-01 -6.9830000e-01 + -3.7520000e-01 1.0714000e+00 5.2550000e-01 -4.7330000e-01 + -3.5630000e-01 8.4910000e-01 5.2150000e-01 -2.6580000e-01 + -3.4280000e-01 6.7760000e-01 5.8050000e-01 -4.0830000e-01 + -3.3370000e-01 4.6900000e-01 4.9250000e-01 -1.1580000e-01 + -3.3370000e-01 2.5710000e-01 5.0050000e-01 1.1700000e-02 + -3.3160000e-01 9.9800000e-02 6.3450000e-01 -1.2080000e-01 + -3.1400000e-01 -2.7500000e-02 7.0250000e-01 -4.5800000e-02 + -2.8480000e-01 -1.3380000e-01 6.4550000e-01 3.1700000e-02 + -2.5750000e-01 -2.5280000e-01 4.6250000e-01 1.9670000e-01 + -2.3420000e-01 -3.6850000e-01 4.3650000e-01 9.1700000e-02 + -2.0830000e-01 -4.7700000e-01 4.6650000e-01 7.6700000e-02 + -1.8750000e-01 -6.0380000e-01 3.6950000e-01 3.9420000e-01 + -1.7670000e-01 -6.8910000e-01 3.6450000e-01 2.7670000e-01 + -1.6470000e-01 -7.2740000e-01 4.2250000e-01 1.3420000e-01 + -1.4960000e-01 -7.5680000e-01 3.6850000e-01 2.6420000e-01 + -1.4270000e-01 -8.1460000e-01 2.3150000e-01 3.7670000e-01 + -1.4380000e-01 -9.2730000e-01 2.2850000e-01 3.5170000e-01 + -1.3840000e-01 -1.0284000e+00 4.1050000e-01 2.1170000e-01 + -1.2490000e-01 -1.1491000e+00 4.1850000e-01 4.7170000e-01 + -1.1470000e-01 -1.3249000e+00 2.6650000e-01 6.9170000e-01 + -9.8900000e-02 -1.4528000e+00 2.7950000e-01 4.8670000e-01 + -6.1900000e-02 -1.5434000e+00 3.5250000e-01 5.6670000e-01 + -8.1000000e-03 -1.6087000e+00 2.6150000e-01 7.2420000e-01 + 5.0700000e-02 -1.6067000e+00 8.5500000e-02 6.6920000e-01 + 1.0510000e-01 -1.5640000e+00 -4.0500000e-02 7.3170000e-01 + 1.4820000e-01 -1.4225000e+00 -7.9500000e-02 6.4920000e-01 + 1.8040000e-01 -1.1516000e+00 -1.5050000e-01 4.2670000e-01 + 2.0270000e-01 -8.0820000e-01 -2.6350000e-01 3.4920000e-01 + 2.1350000e-01 -4.1650000e-01 -2.3750000e-01 1.1920000e-01 + 2.1480000e-01 -3.8300000e-02 -1.7450000e-01 -1.1080000e-01 + 2.0760000e-01 3.1440000e-01 -3.0450000e-01 -1.4330000e-01 + 2.0040000e-01 6.2440000e-01 -3.4150000e-01 -4.1080000e-01 + 2.1100000e-01 7.9090000e-01 -2.1050000e-01 -6.5830000e-01 + 2.3610000e-01 8.2130000e-01 -2.2950000e-01 -3.8330000e-01 + 2.6020000e-01 7.6200000e-01 -3.4950000e-01 -3.5330000e-01 + 2.8410000e-01 6.1440000e-01 -4.3950000e-01 -4.7830000e-01 + 3.0560000e-01 4.2090000e-01 -4.8350000e-01 -1.6830000e-01 + 3.1760000e-01 2.0840000e-01 -4.5350000e-01 -7.8300000e-02 + 3.2500000e-01 -4.0700000e-02 -4.6950000e-01 -7.8300000e-02 + 3.2870000e-01 -3.3280000e-01 -5.0050000e-01 1.7920000e-01 + 3.1870000e-01 -6.2660000e-01 -5.0850000e-01 4.1170000e-01 + 2.9610000e-01 -8.8940000e-01 -5.1950000e-01 4.6170000e-01 + 2.7400000e-01 -1.0959000e+00 -4.9950000e-01 4.4920000e-01 + 2.5420000e-01 -1.1684000e+00 -4.7950000e-01 6.4670000e-01 + 2.3210000e-01 -1.0800000e+00 -3.8950000e-01 5.5420000e-01 + 2.1100000e-01 -8.8080000e-01 -3.4950000e-01 3.0670000e-01 + 1.9000000e-01 -6.4150000e-01 -3.9650000e-01 3.1670000e-01 + 1.6820000e-01 -4.7530000e-01 -3.0050000e-01 4.6700000e-02 + 1.4580000e-01 -4.4140000e-01 -2.0550000e-01 9.1700000e-02 + 1.1630000e-01 -4.3860000e-01 -1.4250000e-01 2.6170000e-01 + 8.9100000e-02 -3.7330000e-01 4.5000000e-03 -9.3300000e-02 + 7.6000000e-02 -3.2170000e-01 4.1500000e-02 -4.0800000e-02 + 6.6900000e-02 -3.0100000e-01 -1.3500000e-02 1.4670000e-01 + 5.6000000e-02 -2.1670000e-01 -3.0500000e-02 -7.0800000e-02 + 4.7600000e-02 -1.0600000e-01 -4.0500000e-02 -4.5800000e-02 + 4.5800000e-02 -2.3000000e-02 3.5000000e-03 -1.2080000e-01 + 5.4000000e-02 1.5500000e-02 -8.5000000e-03 -1.7330000e-01 + 6.6800000e-02 -1.4700000e-02 -1.0050000e-01 1.1700000e-02 + 7.9200000e-02 -3.9800000e-02 -1.4250000e-01 -5.0800000e-02 + 9.3300000e-02 -3.4700000e-02 -1.7350000e-01 -5.0800000e-02 + 1.0890000e-01 -3.7400000e-02 -2.0450000e-01 -2.8300000e-02 + 1.1950000e-01 -3.8000000e-02 -2.6250000e-01 2.9200000e-02 + 1.1950000e-01 -1.7900000e-02 -2.7250000e-01 2.6700000e-02 + 1.1100000e-01 6.7300000e-02 -2.3350000e-01 -1.4830000e-01 + 9.1600000e-02 2.1590000e-01 -2.8650000e-01 -3.8300000e-02 + 5.9600000e-02 3.9600000e-01 -2.4050000e-01 -1.7330000e-01 + 2.6700000e-02 6.0760000e-01 -1.0250000e-01 -4.3330000e-01 + -1.7000000e-03 8.5190000e-01 -3.9500000e-02 -3.8830000e-01 + -2.4800000e-02 1.1211000e+00 1.5000000e-03 -6.5330000e-01 + -4.1400000e-02 1.3389000e+00 -4.1500000e-02 -6.8330000e-01 + -5.0500000e-02 1.4805000e+00 -1.4500000e-02 -7.2080000e-01 + -4.1800000e-02 1.5473000e+00 7.8500000e-02 -1.0008000e+00 + -1.8200000e-02 1.5086000e+00 -4.6500000e-02 -7.1580000e-01 + 4.7000000e-03 1.4786000e+00 -1.4550000e-01 -6.8580000e-01 + 2.8600000e-02 1.4618000e+00 -1.1350000e-01 -8.9330000e-01 + 5.4400000e-02 1.3645000e+00 -1.5250000e-01 -6.7330000e-01 + 7.3500000e-02 1.2553000e+00 -1.9450000e-01 -6.5830000e-01 + 8.0400000e-02 1.1186000e+00 -2.2850000e-01 -5.4330000e-01 + 7.6800000e-02 9.3360000e-01 -1.3450000e-01 -4.4830000e-01 + 7.0000000e-02 7.6480000e-01 -3.5500000e-02 -4.3330000e-01 + 6.4200000e-02 5.9640000e-01 -6.1500000e-02 -2.5830000e-01 + 6.0800000e-02 4.2080000e-01 -4.9500000e-02 -2.2580000e-01 + 6.0200000e-02 2.3070000e-01 -1.5500000e-02 -4.0800000e-02 + 6.5900000e-02 5.1400000e-02 4.3500000e-02 -4.3300000e-02 + 8.2000000e-02 -9.4500000e-02 1.0500000e-02 -5.8300000e-02 + 9.5600000e-02 -2.2560000e-01 -1.2350000e-01 2.6670000e-01 + 9.4800000e-02 -2.8070000e-01 -1.0550000e-01 1.7170000e-01 + 8.6800000e-02 -2.9450000e-01 -5.1500000e-02 3.6700000e-02 + 7.5400000e-02 -3.4940000e-01 -8.2500000e-02 1.9420000e-01 + 5.7400000e-02 -4.0330000e-01 -8.1500000e-02 1.8670000e-01 + 3.5700000e-02 -4.5870000e-01 -1.1500000e-02 1.7170000e-01 + 1.5600000e-02 -5.3460000e-01 5.0500000e-02 1.8670000e-01 + -2.3000000e-03 -6.2370000e-01 1.3500000e-02 3.0170000e-01 + -1.6500000e-02 -7.2280000e-01 5.2500000e-02 2.7170000e-01 + -2.3000000e-02 -7.9280000e-01 1.6050000e-01 2.4170000e-01 + -2.8400000e-02 -8.2190000e-01 1.6150000e-01 4.6420000e-01 + -3.2700000e-02 -8.0360000e-01 1.6250000e-01 2.9170000e-01 + -2.1000000e-02 -7.4660000e-01 1.9150000e-01 1.5670000e-01 + 1.1100000e-02 -7.2420000e-01 2.0050000e-01 3.0420000e-01 + 5.9200000e-02 -7.5730000e-01 1.4650000e-01 2.6670000e-01 + 1.2310000e-01 -7.8440000e-01 -9.5000000e-03 2.4670000e-01 + 1.9990000e-01 -7.7940000e-01 -1.3750000e-01 2.6920000e-01 + 2.8040000e-01 -7.5130000e-01 -2.8250000e-01 3.1170000e-01 + 3.5600000e-01 -6.7740000e-01 -4.3150000e-01 2.4670000e-01 + 4.1980000e-01 -5.8540000e-01 -5.6250000e-01 2.2420000e-01 + 4.6500000e-01 -5.2770000e-01 -6.6850000e-01 3.2420000e-01 + 4.9750000e-01 -4.8880000e-01 -6.6750000e-01 1.6420000e-01 + 5.3290000e-01 -4.8560000e-01 -6.7050000e-01 9.6700000e-02 + 5.7140000e-01 -5.2860000e-01 -7.5350000e-01 2.2920000e-01 + 5.9740000e-01 -5.5280000e-01 -8.8350000e-01 3.7170000e-01 + 6.0360000e-01 -5.2370000e-01 -9.2850000e-01 3.5420000e-01 + 6.0180000e-01 -4.5130000e-01 -8.5450000e-01 1.4170000e-01 + 5.9950000e-01 -3.4140000e-01 -8.3950000e-01 2.0670000e-01 + 5.9160000e-01 -2.0100000e-01 -8.2050000e-01 1.9420000e-01 + 5.7540000e-01 -6.2600000e-02 -8.0650000e-01 8.9200000e-02 + 5.5420000e-01 4.7000000e-02 -8.1550000e-01 9.6700000e-02 + 5.3750000e-01 9.6300000e-02 -7.7750000e-01 -8.0800000e-02 + 5.3060000e-01 6.3700000e-02 -8.0450000e-01 3.6700000e-02 + 5.2960000e-01 6.5000000e-03 -7.7950000e-01 4.9200000e-02 + 5.3190000e-01 -8.2100000e-02 -7.7850000e-01 -2.0800000e-02 + 5.2390000e-01 -2.3300000e-01 -9.2850000e-01 2.7670000e-01 + 4.9110000e-01 -3.5340000e-01 -9.8750000e-01 2.4920000e-01 + 4.3680000e-01 -4.0410000e-01 -9.1350000e-01 2.7670000e-01 + 3.7740000e-01 -4.3960000e-01 -6.9650000e-01 2.3170000e-01 + 3.2990000e-01 -5.1890000e-01 -5.0850000e-01 1.6170000e-01 + 2.9460000e-01 -5.8760000e-01 -5.2850000e-01 4.6170000e-01 + 2.7320000e-01 -5.1180000e-01 -4.4950000e-01 1.9170000e-01 + 2.7350000e-01 -3.6760000e-01 -4.3350000e-01 1.0920000e-01 + 2.8970000e-01 -2.4880000e-01 -4.8750000e-01 2.3170000e-01 + 3.1880000e-01 -1.1070000e-01 -4.4450000e-01 -7.5800000e-02 + 3.5800000e-01 3.1000000e-02 -4.6550000e-01 3.6700000e-02 + 3.9990000e-01 2.0990000e-01 -4.8250000e-01 -9.3300000e-02 + 4.4160000e-01 4.5370000e-01 -6.3050000e-01 -2.7080000e-01 + 4.7580000e-01 6.7440000e-01 -8.0750000e-01 -1.5330000e-01 + 5.0330000e-01 8.1670000e-01 -7.2350000e-01 -5.0580000e-01 + 5.2490000e-01 8.8120000e-01 -7.3850000e-01 -3.7830000e-01 + 5.3020000e-01 9.2260000e-01 -8.1150000e-01 -2.8580000e-01 + 5.2130000e-01 9.5720000e-01 -8.1950000e-01 -5.7830000e-01 + 4.9670000e-01 9.5280000e-01 -8.7250000e-01 -2.4830000e-01 + 4.5350000e-01 9.5630000e-01 -7.6850000e-01 -3.8080000e-01 + 4.0220000e-01 9.9230000e-01 -6.6850000e-01 -5.2580000e-01 + 3.4350000e-01 1.0462000e+00 -6.2050000e-01 -2.4330000e-01 + 2.8160000e-01 1.1181000e+00 -4.3650000e-01 -5.5080000e-01 + 2.2760000e-01 1.1811000e+00 -3.6850000e-01 -5.8580000e-01 + 1.7520000e-01 1.2622000e+00 -3.7650000e-01 -4.5080000e-01 + 1.1880000e-01 1.4145000e+00 -3.0250000e-01 -6.8080000e-01 + 6.2400000e-02 1.5738000e+00 -1.9750000e-01 -7.0830000e-01 + 1.1800000e-02 1.6516000e+00 -6.4500000e-02 -8.3580000e-01 + -3.3300000e-02 1.6513000e+00 -6.2500000e-02 -8.3830000e-01 + -8.2600000e-02 1.5769000e+00 -1.0650000e-01 -6.1580000e-01 + -1.3180000e-01 1.4702000e+00 1.2500000e-02 -7.8330000e-01 + -1.6700000e-01 1.4121000e+00 1.1150000e-01 -7.9080000e-01 + -1.9170000e-01 1.3594000e+00 9.8500000e-02 -5.4330000e-01 + -2.1250000e-01 1.2994000e+00 1.2950000e-01 -6.1080000e-01 + -2.2490000e-01 1.2767000e+00 2.4150000e-01 -6.8330000e-01 + -2.3190000e-01 1.2354000e+00 2.7950000e-01 -5.2830000e-01 + -2.4300000e-01 1.1914000e+00 2.6650000e-01 -4.9580000e-01 + -2.5980000e-01 1.1599000e+00 3.6150000e-01 -5.6080000e-01 + -2.8180000e-01 1.0552000e+00 4.9150000e-01 -4.0080000e-01 + -3.0760000e-01 8.9830000e-01 5.7650000e-01 -2.8330000e-01 + -3.2100000e-01 7.4770000e-01 6.5350000e-01 -4.0830000e-01 + -3.1010000e-01 6.1460000e-01 6.7650000e-01 -3.3830000e-01 + -2.9000000e-01 5.1630000e-01 5.6250000e-01 6.7000000e-03 + -2.7230000e-01 4.5570000e-01 4.5750000e-01 -6.8300000e-02 + -2.4650000e-01 3.8690000e-01 4.0350000e-01 -2.2330000e-01 + -2.0990000e-01 2.4990000e-01 3.4950000e-01 9.2000000e-03 + -1.7390000e-01 1.0370000e-01 3.0550000e-01 2.6700000e-02 + -1.5120000e-01 1.1900000e-02 1.6950000e-01 1.5170000e-01 + -1.4840000e-01 -5.1900000e-02 8.0500000e-02 2.8420000e-01 + -1.5100000e-01 -6.9900000e-02 2.0450000e-01 -5.3300000e-02 + -1.4950000e-01 -5.7500000e-02 2.4850000e-01 5.1700000e-02 + -1.5720000e-01 -4.9400000e-02 2.2050000e-01 2.8670000e-01 + -1.7150000e-01 -6.1200000e-02 3.3550000e-01 -6.5800000e-02 + -1.8100000e-01 -1.3910000e-01 3.7150000e-01 4.4200000e-02 + -1.9160000e-01 -2.3170000e-01 3.2550000e-01 2.3670000e-01 + -2.0450000e-01 -3.0660000e-01 3.3750000e-01 8.4200000e-02 + -2.1520000e-01 -4.0150000e-01 3.6250000e-01 2.1670000e-01 + -2.2280000e-01 -5.1040000e-01 4.3150000e-01 2.2920000e-01 + -2.2640000e-01 -6.6690000e-01 3.6950000e-01 2.8170000e-01 + -2.3220000e-01 -8.3040000e-01 2.0350000e-01 5.2170000e-01 + -2.4240000e-01 -9.2020000e-01 2.1150000e-01 4.9920000e-01 + -2.4380000e-01 -9.5490000e-01 3.0450000e-01 3.7420000e-01 + -2.2880000e-01 -9.2320000e-01 2.7350000e-01 3.7920000e-01 + -2.0760000e-01 -8.6490000e-01 1.5050000e-01 5.1420000e-01 + -1.8810000e-01 -8.2260000e-01 1.3450000e-01 4.1420000e-01 + -1.6700000e-01 -7.4090000e-01 1.6150000e-01 2.6170000e-01 + -1.4510000e-01 -6.4250000e-01 1.0150000e-01 3.6170000e-01 + -1.2300000e-01 -5.6380000e-01 1.2750000e-01 1.9170000e-01 + -9.8400000e-02 -5.3630000e-01 2.1950000e-01 1.4920000e-01 + -8.0300000e-02 -5.9530000e-01 1.9450000e-01 3.9170000e-01 + -7.2900000e-02 -6.5550000e-01 1.0850000e-01 3.2670000e-01 + -6.3200000e-02 -6.8650000e-01 1.1450000e-01 1.7170000e-01 + -4.8900000e-02 -7.2490000e-01 1.4850000e-01 3.4420000e-01 + -4.3900000e-02 -7.0280000e-01 9.9500000e-02 4.7170000e-01 + -4.5100000e-02 -6.0420000e-01 6.2500000e-02 2.1170000e-01 + -4.0600000e-02 -5.2690000e-01 2.4500000e-02 1.3670000e-01 + -3.8300000e-02 -4.8940000e-01 -4.3500000e-02 3.3920000e-01 + -4.8500000e-02 -4.4380000e-01 -4.5500000e-02 2.0670000e-01 + -6.7900000e-02 -4.3310000e-01 -3.9500000e-02 2.0420000e-01 + -8.9500000e-02 -4.7680000e-01 4.4500000e-02 2.2170000e-01 + -1.0770000e-01 -4.9580000e-01 1.2650000e-01 8.1700000e-02 + -1.3290000e-01 -4.9510000e-01 2.7500000e-02 3.7170000e-01 + -1.7370000e-01 -5.2210000e-01 4.4500000e-02 3.2170000e-01 + -2.1320000e-01 -5.7390000e-01 2.1650000e-01 7.4200000e-02 + -2.4030000e-01 -6.5890000e-01 2.8950000e-01 3.2670000e-01 + -2.5750000e-01 -7.5920000e-01 3.1650000e-01 3.4420000e-01 + -2.6390000e-01 -8.2950000e-01 2.8850000e-01 3.4170000e-01 + -2.5940000e-01 -8.8650000e-01 2.7750000e-01 3.9920000e-01 + -2.4400000e-01 -9.9620000e-01 2.6050000e-01 3.3670000e-01 + -2.2670000e-01 -1.1301000e+00 9.8500000e-02 6.1670000e-01 + -2.1830000e-01 -1.1910000e+00 6.5500000e-02 6.4170000e-01 + -2.1230000e-01 -1.1804000e+00 1.7350000e-01 4.1920000e-01 + -2.0630000e-01 -1.1308000e+00 1.1450000e-01 5.3670000e-01 + -2.1030000e-01 -1.0522000e+00 -1.3500000e-02 6.2920000e-01 + -2.1770000e-01 -9.7230000e-01 5.9500000e-02 3.8670000e-01 + -2.0850000e-01 -8.9740000e-01 2.2950000e-01 2.3170000e-01 + -1.8160000e-01 -8.5200000e-01 1.9050000e-01 4.0170000e-01 + -1.4710000e-01 -8.5410000e-01 7.1500000e-02 3.9170000e-01 + -1.0480000e-01 -8.6220000e-01 6.1500000e-02 2.5920000e-01 + -5.7600000e-02 -8.4630000e-01 6.1500000e-02 3.7670000e-01 + -1.3600000e-02 -8.1920000e-01 -1.8500000e-02 3.3920000e-01 + 2.3500000e-02 -7.7880000e-01 -1.4150000e-01 3.2920000e-01 + 5.5100000e-02 -7.0210000e-01 -1.0950000e-01 2.8670000e-01 + 8.5600000e-02 -6.4670000e-01 -6.7500000e-02 1.6670000e-01 + 1.1200000e-01 -6.4490000e-01 -2.7050000e-01 3.2170000e-01 + 1.2970000e-01 -6.2910000e-01 -4.1150000e-01 2.3920000e-01 + 1.4330000e-01 -6.0980000e-01 -3.7550000e-01 1.1670000e-01 + 1.4930000e-01 -5.6490000e-01 -4.0150000e-01 2.9670000e-01 + 1.4130000e-01 -4.2000000e-01 -4.7950000e-01 1.7420000e-01 + 1.2510000e-01 -2.3490000e-01 -5.0450000e-01 -3.3300000e-02 + 1.0350000e-01 -7.2300000e-02 -4.1950000e-01 -2.8300000e-02 + 7.1400000e-02 8.7100000e-02 -3.4850000e-01 -5.3300000e-02 + 3.0000000e-02 2.8660000e-01 -3.3450000e-01 -1.8830000e-01 + -1.1500000e-02 5.2330000e-01 -2.2350000e-01 -3.5080000e-01 + -4.7400000e-02 7.9160000e-01 -7.2500000e-02 -4.2580000e-01 + -7.6500000e-02 1.1562000e+00 -1.0500000e-02 -6.1330000e-01 + -9.8100000e-02 1.5229000e+00 -3.6500000e-02 -7.9580000e-01 + -1.1620000e-01 1.7436000e+00 -5.8500000e-02 -7.9830000e-01 + -1.3160000e-01 1.8822000e+00 2.5000000e-03 -9.0080000e-01 + -1.3490000e-01 1.9916000e+00 6.0500000e-02 -1.0358000e+00 + -1.2020000e-01 2.0391000e+00 6.5000000e-03 -1.0233000e+00 + -9.3200000e-02 2.0123000e+00 -6.2500000e-02 -9.4830000e-01 + -6.0900000e-02 1.9210000e+00 -8.0500000e-02 -9.5830000e-01 + -2.9300000e-02 1.8059000e+00 -1.7850000e-01 -8.4580000e-01 + -5.2000000e-03 1.7253000e+00 -2.6250000e-01 -7.7330000e-01 + 9.1000000e-03 1.7317000e+00 -2.1950000e-01 -8.8830000e-01 + 6.3000000e-03 1.7910000e+00 -1.9250000e-01 -7.3330000e-01 + -1.7500000e-02 1.8525000e+00 -1.5350000e-01 -7.4330000e-01 + -4.6000000e-02 1.9114000e+00 -4.0500000e-02 -1.0208000e+00 + -6.5600000e-02 1.9435000e+00 3.6500000e-02 -9.3830000e-01 + -7.9300000e-02 1.9967000e+00 1.0750000e-01 -9.4330000e-01 + -8.9000000e-02 2.0655000e+00 1.2750000e-01 -1.0708000e+00 + -9.7100000e-02 2.0547000e+00 9.8500000e-02 -9.8080000e-01 + -1.0560000e-01 1.9936000e+00 1.4250000e-01 -1.0508000e+00 + -1.1330000e-01 1.9289000e+00 1.4450000e-01 -1.0233000e+00 + -1.2020000e-01 1.8841000e+00 1.4450000e-01 -1.0283000e+00 + -1.2780000e-01 1.8653000e+00 1.6050000e-01 -1.1133000e+00 + -1.4560000e-01 1.8273000e+00 9.0500000e-02 -9.4330000e-01 + -1.7960000e-01 1.7730000e+00 8.0500000e-02 -9.8330000e-01 + -2.1910000e-01 1.6584000e+00 1.5750000e-01 -1.0358000e+00 + -2.5440000e-01 1.4743000e+00 2.5650000e-01 -9.0830000e-01 + -2.8540000e-01 1.3089000e+00 3.5650000e-01 -9.0830000e-01 + -3.2080000e-01 1.1494000e+00 3.2950000e-01 -6.7580000e-01 + -3.6420000e-01 9.9270000e-01 3.6550000e-01 -6.6830000e-01 + -4.0520000e-01 8.2630000e-01 5.0050000e-01 -7.6580000e-01 + -4.4430000e-01 5.7800000e-01 5.3550000e-01 -4.1330000e-01 + -4.8910000e-01 3.1030000e-01 6.3550000e-01 -3.5580000e-01 + -5.3730000e-01 1.1070000e-01 7.2750000e-01 -2.8080000e-01 + -5.8490000e-01 3.3400000e-02 7.6450000e-01 -1.0080000e-01 + -6.2120000e-01 1.0170000e-01 8.4150000e-01 -3.3080000e-01 + -6.3750000e-01 2.1410000e-01 8.0550000e-01 -2.6080000e-01 + -6.3490000e-01 3.1870000e-01 8.1950000e-01 -2.6830000e-01 + -6.1000000e-01 4.1730000e-01 8.7850000e-01 -5.5580000e-01 + -5.7470000e-01 4.4040000e-01 6.7350000e-01 -2.0580000e-01 + -5.4530000e-01 3.6790000e-01 5.5250000e-01 -1.7330000e-01 + -5.1160000e-01 2.4960000e-01 6.2650000e-01 -4.1830000e-01 + -4.6740000e-01 1.3140000e-01 6.4850000e-01 -1.4080000e-01 + -4.2140000e-01 3.1600000e-02 6.3650000e-01 -1.3580000e-01 + -3.8110000e-01 -3.4900000e-02 5.0350000e-01 -7.8300000e-02 + -3.4980000e-01 -5.0400000e-02 4.4450000e-01 9.2000000e-03 + -3.1650000e-01 -7.7200000e-02 5.0550000e-01 -2.2580000e-01 + -2.7360000e-01 -1.9110000e-01 4.3250000e-01 -9.8300000e-02 + -2.3330000e-01 -3.8450000e-01 3.4950000e-01 9.1700000e-02 + -2.1160000e-01 -6.0800000e-01 2.8550000e-01 1.9170000e-01 + -2.1400000e-01 -7.8730000e-01 2.0950000e-01 3.6420000e-01 + -2.2780000e-01 -9.0550000e-01 1.7950000e-01 2.6420000e-01 + -2.3680000e-01 -1.0029000e+00 1.6650000e-01 3.3170000e-01 + -2.3500000e-01 -1.0601000e+00 2.2550000e-01 3.6170000e-01 + -2.2320000e-01 -1.0793000e+00 2.1450000e-01 2.5920000e-01 + -2.1660000e-01 -1.0744000e+00 -3.0500000e-02 4.9420000e-01 + -2.2880000e-01 -9.6630000e-01 -1.7950000e-01 4.2920000e-01 + -2.4820000e-01 -7.6300000e-01 -5.9500000e-02 1.1170000e-01 + -2.5980000e-01 -5.9670000e-01 1.2150000e-01 9.6700000e-02 + -2.6180000e-01 -4.9250000e-01 2.0250000e-01 4.9200000e-02 + -2.5900000e-01 -4.0100000e-01 1.6050000e-01 3.6700000e-02 + -2.5500000e-01 -3.3280000e-01 1.1850000e-01 8.6700000e-02 + -2.4310000e-01 -2.9460000e-01 1.6050000e-01 -8.0800000e-02 + -2.1660000e-01 -2.7870000e-01 1.6450000e-01 -3.8300000e-02 + -1.8170000e-01 -3.1220000e-01 1.7550000e-01 1.0670000e-01 + -1.4080000e-01 -4.0760000e-01 2.4850000e-01 -5.8000000e-03 + -9.5500000e-02 -5.1210000e-01 1.3350000e-01 1.1920000e-01 + -5.8000000e-02 -5.4060000e-01 -9.6500000e-02 2.2920000e-01 + -3.7100000e-02 -4.9960000e-01 -1.9450000e-01 1.2920000e-01 + -3.5700000e-02 -4.6310000e-01 -1.4950000e-01 2.1420000e-01 + -4.9700000e-02 -4.4360000e-01 -6.5000000e-03 7.1700000e-02 + -7.3700000e-02 -4.5190000e-01 -1.6500000e-02 9.9200000e-02 + -1.1190000e-01 -4.6870000e-01 -8.6500000e-02 2.8920000e-01 + -1.5610000e-01 -4.5430000e-01 3.7500000e-02 -2.0800000... [truncated message content] |
From: <par...@us...> - 2012-04-18 08:53:19
|
Revision: 10275 http://octave.svn.sourceforge.net/octave/?rev=10275&view=rev Author: paramaniac Date: 2012-04-18 08:53:07 +0000 (Wed, 18 Apr 2012) Log Message: ----------- control-devel: use larger ldwork as specified under further comments in slicot ib01ad Modified Paths: -------------- trunk/octave-forge/extra/control-devel/devel/ident.m trunk/octave-forge/extra/control-devel/src/slident.cc Modified: trunk/octave-forge/extra/control-devel/devel/ident.m =================================================================== --- trunk/octave-forge/extra/control-devel/devel/ident.m 2012-04-18 07:15:07 UTC (rev 10274) +++ trunk/octave-forge/extra/control-devel/devel/ident.m 2012-04-18 08:53:07 UTC (rev 10275) @@ -32,6 +32,7 @@ ctrl = 0; # confirm system order estimate n = 0; else # s & n non-empty + disp ("======== hallo ===============") nsmp = ns(1); nobr = fix ((nsmp+1)/(2*(m+l+1))); if (s > nobr) Modified: trunk/octave-forge/extra/control-devel/src/slident.cc =================================================================== --- trunk/octave-forge/extra/control-devel/src/slident.cc 2012-04-18 07:15:07 UTC (rev 10274) +++ trunk/octave-forge/extra/control-devel/src/slident.cc 2012-04-18 08:53:07 UTC (rev 10275) @@ -254,6 +254,7 @@ // TODO: Handle 'k' for DWORK int ldwork; + int ns = nsmp - 2*nobr + 1; if (alg == 'C') { @@ -289,7 +290,7 @@ } else // (alg == 'Q') { - int ns = nsmp - 2*nobr + 1; + // int ns = nsmp - 2*nobr + 1; if (ldr >= ns && batch == 'F') { @@ -311,14 +312,26 @@ ldwork = 6*(m+l)*nobr; } } -//////////////////////////////////////////////////////////////////// -// TO BE REMOVED !!! -//////////////////////////////////////////////////////////////////// -ldwork *= 2; -//ldwork = 1000000; -//////////////////////////////////////////////////////////////////// /* +IB01AD.f Lines 438-445 +C FURTHER COMMENTS +C +C For ALG = 'Q', BATCH = 'O' and LDR < NS, or BATCH <> 'O', the +C calculations could be rather inefficient if only minimal workspace +C (see argument LDWORK) is provided. It is advisable to provide as +C much workspace as possible. Almost optimal efficiency can be +C obtained for LDWORK = (NS+2)*(2*(M+L)*NOBR), assuming that the +C cache size is large enough to accommodate R, U, Y, and DWORK. +*/ + +// warning ("==================== ldwork before: %d =====================", ldwork); +// ldwork = (ns+2)*(2*(m+l)*nobr); +ldwork = max (ldwork, (ns+2)*(2*(m+l)*nobr)); +// warning ("==================== ldwork after: %d =====================", ldwork); + + +/* IB01AD.f Lines 291-195: c the workspace used for alg = 'q' is c ldrwrk*2*(m+l)*nobr + 4*(m+l)*nobr, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2012-04-18 07:15:18
|
Revision: 10274 http://octave.svn.sourceforge.net/octave/?rev=10274&view=rev Author: jpicarbajal Date: 2012-04-18 07:15:07 +0000 (Wed, 18 Apr 2012) Log Message: ----------- optim: Numerical derivatives using the Cauchy integral. Modified Paths: -------------- trunk/octave-forge/main/optim/INDEX trunk/octave-forge/main/optim/NEWS Added Paths: ----------- trunk/octave-forge/main/optim/cauchy.m Modified: trunk/octave-forge/main/optim/INDEX =================================================================== --- trunk/octave-forge/main/optim/INDEX 2012-04-17 15:54:44 UTC (rev 10273) +++ trunk/octave-forge/main/optim/INDEX 2012-04-18 07:15:07 UTC (rev 10274) @@ -1,6 +1,6 @@ optimization >> Optimization Minimization - minimize + minimize nelder_mead_min d2_min nrm @@ -31,7 +31,7 @@ linprog Numerical derivatives dfdp dcdp dfpdp dfxpdp cdiff deriv - numgradient numhessian jacobs + numgradient numhessian jacobs cauchy Pivoting cpiv_bard gjp Modified: trunk/octave-forge/main/optim/NEWS =================================================================== --- trunk/octave-forge/main/optim/NEWS 2012-04-17 15:54:44 UTC (rev 10273) +++ trunk/octave-forge/main/optim/NEWS 2012-04-18 07:15:07 UTC (rev 10274) @@ -3,7 +3,7 @@ ** The following functions are new optim 1.1.0: - powell + powell cauchy ** The following functions have been deprecated since they have been implemented in Octave core: Added: trunk/octave-forge/main/optim/cauchy.m =================================================================== --- trunk/octave-forge/main/optim/cauchy.m (rev 0) +++ trunk/octave-forge/main/optim/cauchy.m 2012-04-18 07:15:07 UTC (rev 10274) @@ -0,0 +1,123 @@ +## Copyright (C) 2011 Fernando Damian Nieuwveldt <fdn...@gm...> +## 2012 Adapted by Juan Pablo Carbajal <car...@if...> +## +## This program is free software; you can redistribute it and/or +## modify it under the terms of the GNU General Public License +## as published by the Free Software Foundation; either version 3 +## of the License, or (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. + +## -*- texinfo -*- +## @deftypefn {Function File} {} cauchy (@var{N}, @var{r}, @var{x}, @var{f} ) +## Return the Taylor coefficients and numerical differentiation of a function +## @var{f} for the first @var{N-1} coefficients or derivatives using the fft. +## @var{N} is the number of points to evaluate, +## @var{r} is the radius of convergence, needs to be chosen less then the smallest singularity, +## @var{x} is point to evaluate the Taylor expansion or differentiation. For example, +## +## If @var{x} is a scalar, the function @var{f} is evaluated in a row vector +## of length @var{N}. If @var{x} is a column vector, @var{f} is evaluated in a +## matrix of length(x)-by-N elements and must return a matrix of the same size. +## +## @example +## @group +## d = cauchy(16,1.5,0,@(x) exp(x)); +## @result{} d(2) = 1.0000 # first (2-1) derivative of function f (index starts from zero) +## @end group +## @end example +## @end deftypefn + +function deriv = cauchy(N, r, x, f) + + if nargin != 4 + print_usage (); + end + + [nx m] = size (x); + if m > 1 + error('cauchy:InvalidArgument', 'The 3rd argument must be a column vector'); + end + + n = 0:N-1; + th = 2*pi*n/N; + + f_p = f (bsxfun (@plus, x, r * exp (i * th) ) ); + + evalfft = real(fft (f_p, [], 2)); + + deriv = bsxfun (@times, evalfft, 1./(N*(r.^n)).* factorial(n)) ; + +endfunction + +%!demo +%! # Cauchy integral formula: Application to Hermite polynomials +%! # Author: Fernando Damian Nieuwveldt +%! # Edited by: Juan Pablo Carbajal +%! +%! function g = hermite(order,x) +%! +%! ## N should be bigger than order+1 +%! N = 32; +%! r = 0.5; +%! Hnx = @(t) exp ( bsxfun (@minus, kron(t(:).', x(:)) , t(:).'.^2/2) ); +%! Hnxfft = cauchy(N, r, 0, Hnx); +%! g = Hnxfft(:, order+1); +%! +%! endfunction +%! +%! t = linspace(-1,1,30); +%! he2 = hermite(2,t); +%! he2_ = t.^2-1; +%! +%! plot(t,he2,'bo;Contour integral representation;', t,he2_,'r;Exact;'); +%! grid +%! clear all +%! +%! % -------------------------------------------------------------------------- +%! % The plots compares the approximation of the Hermite polynomial using the +%! % Cauchy integral (circles) and the corresposind polynomial H_2(x) = x.^2 - 1. +%! % See http://en.wikipedia.org/wiki/Hermite_polynomials#Contour_integral_representation + +%!demo +%! # Cauchy integral formula: Application to Hermite polynomials +%! # Author: Fernando Damian Nieuwveldt +%! # Edited by: Juan Pablo Carbajal +%! +%! xx = sort (rand (100,1)); +%! yy = sin (3*2*pi*xx); +%! +%! # Exact first derivative derivative +%! diffy = 6*pi*cos (3*2*pi*xx); +%! +%! np = [10 15 30 100]; +%! +%! for i =1:4 +%! idx = sort(randperm (100,np(i))); +%! x = xx(idx); +%! y = yy(idx); +%! +%! p = spline (x,y); +%! yval = ppval (ppder(p),x); +%! # Use the cauchy formula for computing the derivatives +%! deriv = cauchy (fix (np(i)/4), .1, x, @(x) sin (3*2*pi*x)); +%! +%! subplot(2,2,i) +%! h = plot(xx,diffy,'-b;Exact;',... +%! x,yval,'-or;ppder solution;',... +%! x,deriv(:,2),'-og;Cauchy formula;'); +%! set(h(1),'linewidth',2); +%! set(h(2:3),'markersize',3); +%! +%! legend('Location','Northoutside','Orientation','horizontal'); +%! +%! if i!=1 +%! legend('hide','Orientation','horizontal') +%! end +%! end +%! +%! % -------------------------------------------------------------------------- +%! % The plots compares the derivatives calculated with Cauchy and with ppder. +%! % Each subplot shows the results with increasing number of samples. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |