Nuiton-matrix-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- 559 discussions
Author: echatellier
Date: 2010-12-08 15:28:25 +0100 (Wed, 08 Dec 2010)
New Revision: 298
Url: http://nuiton.org/repositories/revision/nuiton-matrix/298
Log:
Reformat
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-12-08 14:10:03 UTC (rev 297)
+++ trunk/pom.xml 2010-12-08 14:28:25 UTC (rev 298)
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -22,53 +23,53 @@
</modules>
<dependencyManagement>
- <dependencies>
+ <dependencies>
- <dependency>
- <groupId>org.nuiton</groupId>
- <artifactId>nuiton-utils</artifactId>
- <version>${nuitonUtilsVersion}</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.nuiton.i18n</groupId>
- <artifactId>nuiton-i18n</artifactId>
- <version>${nuitonI18nVersion}</version>
- <scope>compile</scope>
- </dependency>
+ <dependency>
+ <groupId>org.nuiton</groupId>
+ <artifactId>nuiton-utils</artifactId>
+ <version>${nuitonUtilsVersion}</version>
+ <scope>compile</scope>
+ </dependency>
- <!--Jaxx -->
- <dependency>
- <groupId>org.nuiton.jaxx</groupId>
- <artifactId>jaxx-runtime</artifactId>
- <version>${jaxxVersion}</version>
- <scope>compile</scope>
- <exclusions>
- <exclusion>
- <groupId>javax.help</groupId>
- <artifactId>javahelp</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.opensymphony</groupId>
- <artifactId>xwork</artifactId>
- </exclusion>
- <exclusion>
- <groupId>opensymphony</groupId>
- <artifactId>ognl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>commons-jxpath</groupId>
- <artifactId>commons-jxpath</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.swinglabs</groupId>
- <artifactId>jxlayer</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
+ <dependency>
+ <groupId>org.nuiton.i18n</groupId>
+ <artifactId>nuiton-i18n</artifactId>
+ <version>${nuitonI18nVersion}</version>
+ <scope>compile</scope>
+ </dependency>
- </dependencies>
+ <!--Jaxx -->
+ <dependency>
+ <groupId>org.nuiton.jaxx</groupId>
+ <artifactId>jaxx-runtime</artifactId>
+ <version>${jaxxVersion}</version>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.help</groupId>
+ <artifactId>javahelp</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.opensymphony</groupId>
+ <artifactId>xwork</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>opensymphony</groupId>
+ <artifactId>ognl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-jxpath</groupId>
+ <artifactId>commons-jxpath</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.swinglabs</groupId>
+ <artifactId>jxlayer</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ </dependencies>
</dependencyManagement>
<!-- ************************************************************* -->
1
0
r297 - in trunk: . nuiton-matrix nuiton-matrix/src nuiton-matrix/src/license nuiton-matrix-gui nuiton-matrix-gui/src nuiton-matrix-gui/src/license nuiton-matrix-gui/src/main/java/org/nuiton/math/matrix/viewer/renderer src
by echatellier@users.nuiton.org 08 Dec '10
by echatellier@users.nuiton.org 08 Dec '10
08 Dec '10
Author: echatellier
Date: 2010-12-08 15:10:03 +0100 (Wed, 08 Dec 2010)
New Revision: 297
Url: http://nuiton.org/repositories/revision/nuiton-matrix/297
Log:
Fix license and copyrigth
Added:
trunk/nuiton-matrix-gui/src/license/
trunk/nuiton-matrix-gui/src/license/THIRD-PARTY.properties
trunk/nuiton-matrix/src/license/
trunk/nuiton-matrix/src/license/THIRD-PARTY.properties
Removed:
trunk/src/license/
Modified:
trunk/nuiton-matrix-gui/LICENSE.txt
trunk/nuiton-matrix-gui/pom.xml
trunk/nuiton-matrix-gui/src/main/java/org/nuiton/math/matrix/viewer/renderer/MatrixInfoTableModel.java
trunk/nuiton-matrix/LICENSE.txt
trunk/nuiton-matrix/pom.xml
trunk/pom.xml
Modified: trunk/nuiton-matrix/LICENSE.txt
===================================================================
--- trunk/nuiton-matrix/LICENSE.txt 2010-12-08 13:56:08 UTC (rev 296)
+++ trunk/nuiton-matrix/LICENSE.txt 2010-12-08 14:10:03 UTC (rev 297)
@@ -0,0 +1,166 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 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.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser 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
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
Modified: trunk/nuiton-matrix/pom.xml
===================================================================
--- trunk/nuiton-matrix/pom.xml 2010-12-08 13:56:08 UTC (rev 296)
+++ trunk/nuiton-matrix/pom.xml 2010-12-08 14:10:03 UTC (rev 297)
@@ -9,11 +9,11 @@
<parent>
<groupId>org.nuiton</groupId>
- <artifactId>matrix</artifactId>
+ <artifactId>nuiton-matrix</artifactId>
<version>2.1-SNAPSHOT</version>
</parent>
- <groupId>org.nuiton.matrix</groupId>
+ <groupId>org.nuiton.nuiton-matrix</groupId>
<artifactId>nuiton-matrix</artifactId>
<dependencies>
@@ -59,6 +59,8 @@
<!-- *** Build Settings ****************************************** -->
<!-- ************************************************************* -->
+ <name>NuitonMatrix :: Nuiton-matrix</name>
+ <description>Matrix core module</description>
<packaging>jar</packaging>
<build>
Added: trunk/nuiton-matrix/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/nuiton-matrix/src/license/THIRD-PARTY.properties (rev 0)
+++ trunk/nuiton-matrix/src/license/THIRD-PARTY.properties 2010-12-08 14:10:03 UTC (rev 297)
@@ -0,0 +1,13 @@
+# Generated by org.nuiton.license.plugin.AddThirdPartyMojo
+#-------------------------------------------------------------------------------
+# Already used licenses in project :
+# - BSD License
+# - Common Public License Version 1.0
+# - Lesser General Public License (LGPL) v 3.0
+# - The Apache Software License, Version 2.0
+#-------------------------------------------------------------------------------
+# Please fill the missing licenses for dependencies :
+#
+#
+#Wed Dec 08 14:59:28 CET 2010
+commons-primitives--commons-primitives--1.0--jar=The Apache Software License, Version 2.0
Modified: trunk/nuiton-matrix-gui/LICENSE.txt
===================================================================
--- trunk/nuiton-matrix-gui/LICENSE.txt 2010-12-08 13:56:08 UTC (rev 296)
+++ trunk/nuiton-matrix-gui/LICENSE.txt 2010-12-08 14:10:03 UTC (rev 297)
@@ -0,0 +1,166 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 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.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser 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
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
Modified: trunk/nuiton-matrix-gui/pom.xml
===================================================================
--- trunk/nuiton-matrix-gui/pom.xml 2010-12-08 13:56:08 UTC (rev 296)
+++ trunk/nuiton-matrix-gui/pom.xml 2010-12-08 14:10:03 UTC (rev 297)
@@ -9,11 +9,11 @@
<parent>
<groupId>org.nuiton</groupId>
- <artifactId>matrix</artifactId>
+ <artifactId>nuiton-matrix</artifactId>
<version>2.1-SNAPSHOT</version>
</parent>
- <groupId>org.nuiton.matrix</groupId>
+ <groupId>org.nuiton.nuiton-matrix</groupId>
<artifactId>nuiton-matrix-gui</artifactId>
<dependencies>
@@ -57,6 +57,8 @@
<!-- *** Build Settings ****************************************** -->
<!-- ************************************************************* -->
+ <name>NuitonMatrix :: Nuiton-matrix-gui</name>
+ <description>Matrix gui module</description>
<packaging>jar</packaging>
<properties>
Added: trunk/nuiton-matrix-gui/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/nuiton-matrix-gui/src/license/THIRD-PARTY.properties (rev 0)
+++ trunk/nuiton-matrix-gui/src/license/THIRD-PARTY.properties 2010-12-08 14:10:03 UTC (rev 297)
@@ -0,0 +1,14 @@
+# Generated by org.nuiton.license.plugin.AddThirdPartyMojo
+#-------------------------------------------------------------------------------
+# Already used licenses in project :
+# - BSD License
+# - Common Public License Version 1.0
+# - Lesser General Public License (LGPL)
+# - Lesser General Public License (LGPL) v 3.0
+# - The Apache Software License, Version 2.0
+#-------------------------------------------------------------------------------
+# Please fill the missing licenses for dependencies :
+#
+#
+#Wed Dec 08 15:01:07 CET 2010
+commons-primitives--commons-primitives--1.0--jar=The Apache Software License, Version 2.0
Modified: trunk/nuiton-matrix-gui/src/main/java/org/nuiton/math/matrix/viewer/renderer/MatrixInfoTableModel.java
===================================================================
--- trunk/nuiton-matrix-gui/src/main/java/org/nuiton/math/matrix/viewer/renderer/MatrixInfoTableModel.java 2010-12-08 13:56:08 UTC (rev 296)
+++ trunk/nuiton-matrix-gui/src/main/java/org/nuiton/math/matrix/viewer/renderer/MatrixInfoTableModel.java 2010-12-08 14:10:03 UTC (rev 297)
@@ -1,25 +1,25 @@
/*
* #%L
- * IsisFish
*
+ *
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2002 - 2010 Ifremer, CodeLutin
+ * Copyright (C) 2002 - 2010 CodeLutin, Chatellier Eric
* %%
* 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
+ * 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 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.
+ * GNU General Lesser Public License for more details.
*
- * You should have received a copy of the GNU General Public
+ * You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/gpl-2.0.html>.
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
* #L%
*/
package org.nuiton.math.matrix.viewer.renderer;
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-12-08 13:56:08 UTC (rev 296)
+++ trunk/pom.xml 2010-12-08 14:10:03 UTC (rev 297)
@@ -13,7 +13,7 @@
<version>2.4.1</version>
</parent>
- <artifactId>matrix</artifactId>
+ <artifactId>nuiton-matrix</artifactId>
<version>2.1-SNAPSHOT</version>
<modules>
1
0
08 Dec '10
Author: echatellier
Date: 2010-12-08 14:56:08 +0100 (Wed, 08 Dec 2010)
New Revision: 296
Url: http://nuiton.org/repositories/revision/nuiton-matrix/296
Log:
set svn:ignore
Modified:
trunk/nuiton-matrix-gui/
trunk/nuiton-matrix/
Property changes on: trunk/nuiton-matrix
___________________________________________________________________
Added: svn:ignore
+ .classpath
.project
.settings
target
Property changes on: trunk/nuiton-matrix-gui
___________________________________________________________________
Added: svn:ignore
+ .settings
target
.classpath
.project
1
0
r295 - in trunk: nuiton-matrix nuiton-matrix/src/main/resources nuiton-matrix/src/main/resources/i18n nuiton-matrix-gui nuiton-matrix-gui/src/main/resources nuiton-matrix-gui/src/main/resources/i18n
by echatellier@users.nuiton.org 08 Dec '10
by echatellier@users.nuiton.org 08 Dec '10
08 Dec '10
Author: echatellier
Date: 2010-12-08 14:47:16 +0100 (Wed, 08 Dec 2010)
New Revision: 295
Url: http://nuiton.org/repositories/revision/nuiton-matrix/295
Log:
Move to multimodules layout
Added:
trunk/nuiton-matrix-gui/LICENSE.txt
trunk/nuiton-matrix-gui/README.txt
trunk/nuiton-matrix-gui/changelog.txt
trunk/nuiton-matrix-gui/src/main/resources/i18n/
trunk/nuiton-matrix-gui/src/main/resources/i18n/nuiton-matrix-gui_en_GB.properties
trunk/nuiton-matrix-gui/src/main/resources/i18n/nuiton-matrix-gui_fr_FR.properties
trunk/nuiton-matrix-gui/src/main/resources/icons/
trunk/nuiton-matrix/LICENSE.txt
trunk/nuiton-matrix/README.txt
trunk/nuiton-matrix/changelog.txt
Removed:
trunk/nuiton-matrix/src/main/resources/icons/
Modified:
trunk/nuiton-matrix/pom.xml
trunk/nuiton-matrix/src/main/resources/i18n/nuiton-matrix_en_GB.properties
trunk/nuiton-matrix/src/main/resources/i18n/nuiton-matrix_fr_FR.properties
Modified: trunk/nuiton-matrix/pom.xml
===================================================================
--- trunk/nuiton-matrix/pom.xml 2010-12-08 13:39:35 UTC (rev 294)
+++ trunk/nuiton-matrix/pom.xml 2010-12-08 13:47:16 UTC (rev 295)
@@ -9,130 +9,73 @@
<parent>
<groupId>org.nuiton</groupId>
- <artifactId>mavenpom4redmineAndCentral</artifactId>
- <version>2.4.1</version>
+ <artifactId>matrix</artifactId>
+ <version>2.1-SNAPSHOT</version>
</parent>
- <artifactId>matrix</artifactId>
- <version>2.1-SNAPSHOT</version>
+ <groupId>org.nuiton.matrix</groupId>
+ <artifactId>nuiton-matrix</artifactId>
- <modules>
- <module>nuiton-matrix</module>
- <module>nuiton-matrix-gui</module>
- </modules>
+ <dependencies>
- <dependencyManagement>
- <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
- <dependency>
- <groupId>org.nuiton</groupId>
- <artifactId>nuiton-utils</artifactId>
- <version>${nuitonUtilsVersion}</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.nuiton.i18n</groupId>
- <artifactId>nuiton-i18n</artifactId>
- <version>${nuitonI18nVersion}</version>
- <scope>compile</scope>
- </dependency>
+ <dependency>
+ <groupId>org.nuiton</groupId>
+ <artifactId>nuiton-utils</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.nuiton.i18n</groupId>
+ <artifactId>nuiton-i18n</artifactId>
+ </dependency>
- <!--Jaxx -->
- <dependency>
- <groupId>org.nuiton.jaxx</groupId>
- <artifactId>jaxx-runtime</artifactId>
- <version>${jaxxVersion}</version>
- <scope>compile</scope>
- <exclusions>
- <exclusion>
- <groupId>javax.help</groupId>
- <artifactId>javahelp</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.opensymphony</groupId>
- <artifactId>xwork</artifactId>
- </exclusion>
- <exclusion>
- <groupId>opensymphony</groupId>
- <artifactId>ognl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>commons-jxpath</groupId>
- <artifactId>commons-jxpath</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.swinglabs</groupId>
- <artifactId>jxlayer</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ </dependency>
- </dependencies>
- </dependencyManagement>
+ <dependency>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
- <!-- ************************************************************* -->
- <!-- *** Project Information ************************************* -->
- <!-- ************************************************************* -->
+ <dependency>
+ <groupId>commons-primitives</groupId>
+ <artifactId>commons-primitives</artifactId>
+ </dependency>
- <name>NuitonMatrix</name>
- <description>Multiple dimensions matrix library</description>
- <inceptionYear>2004</inceptionYear>
- <url>http://maven-site.nuiton.org/nuiton-matrix</url>
+ </dependencies>
<!-- ************************************************************* -->
<!-- *** Build Settings ****************************************** -->
<!-- ************************************************************* -->
- <packaging>pom</packaging>
+ <packaging>jar</packaging>
- <properties>
-
- <jaxxVersion>2.2.3</jaxxVersion>
- <nuitonUtilsVersion>1.5</nuitonUtilsVersion>
- <nuitonI18nVersion>2.0</nuitonI18nVersion>
-
- <!-- extra files to include in release -->
- <redmine.releaseFiles>${redmine.libReleaseFiles}</redmine.releaseFiles>
-
- </properties>
-
<build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.nuiton.jaxx</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- <version>${jaxxVersion}</version>
- </plugin>
- <plugin>
- <groupId>org.nuiton.i18n</groupId>
- <artifactId>maven-i18n-plugin</artifactId>
- <version>${nuitonI18nVersion}</version>
- </plugin>
- <plugin>
- <artifactId>maven-site-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>org.nuiton.jrst</groupId>
- <artifactId>doxia-module-jrst</artifactId>
- <version>${jrstPluginVersion}</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton.i18n</groupId>
+ <artifactId>maven-i18n-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>parserJava</goal>
+ <goal>gen</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
</build>
-
- <!-- ************************************************************* -->
- <!-- *** Build Environment ************************************** -->
- <!-- ************************************************************* -->
-
- <!-- Source control management. -->
- <scm>
- <connection>scm:svn:http://svn.nuiton.org/svn/nuiton-matrix/trunk</connection>
- <developerConnection>scm:svn:http://svn.nuiton.org/svn/nuiton-matrix/trunk</developerConnection>
- <url>http://www.nuiton.org/repositories/browse/nuiton-matrix/trunk</url>
- </scm>
</project>
Modified: trunk/nuiton-matrix/src/main/resources/i18n/nuiton-matrix_en_GB.properties
===================================================================
--- trunk/nuiton-matrix/src/main/resources/i18n/nuiton-matrix_en_GB.properties 2010-12-08 13:39:35 UTC (rev 294)
+++ trunk/nuiton-matrix/src/main/resources/i18n/nuiton-matrix_en_GB.properties 2010-12-08 13:47:16 UTC (rev 295)
@@ -1,23 +1,2 @@
-nuitonmatrix.create.matrix.button=New matrix
-nuitonmatrix.create.matrix.message=Matrix size (separate by ';')
-nuitonmatrix.create.matrix.title=New matrix
-nuitonmatrix.error=Error
-nuitonmatrix.error.clipboard.read=Cannot read clipboard
-nuitonmatrix.error.clipboard.write=Cannot write clipboard
-nuitonmatrix.error.file.read=Cannot read file
-nuitonmatrix.error.file.write=Cannot write file
nuitonmatrix.invalid.element=Invalid element %s in matrix %s
nuitonmatrix.invalid.size=Invalid size\: 0 <\= %d <\= %d
-nuitonmatrix.menu.action=Copy/Paste
-nuitonmatrix.menu.action.copy=Copy
-nuitonmatrix.menu.action.copy.selection=Copy selection
-nuitonmatrix.menu.action.paste=Paste
-nuitonmatrix.menu.action.paste.position=Paste at current position
-nuitonmatrix.menu.csv=Import/Export file CSV
-nuitonmatrix.menu.csv.export.file=Export to file
-nuitonmatrix.menu.csv.export.selection=Export selection
-nuitonmatrix.menu.csv.import.file=Import from file
-nuitonmatrix.menu.csv.import.position=Import at current position
-nuitonmatrix.menu.option.semantics=Export/Copy with semantics
-nuitonmatrix.viewer.renderer.data=Data
-nuitonmatrix.viewer.sum=Sum
Modified: trunk/nuiton-matrix/src/main/resources/i18n/nuiton-matrix_fr_FR.properties
===================================================================
--- trunk/nuiton-matrix/src/main/resources/i18n/nuiton-matrix_fr_FR.properties 2010-12-08 13:39:35 UTC (rev 294)
+++ trunk/nuiton-matrix/src/main/resources/i18n/nuiton-matrix_fr_FR.properties 2010-12-08 13:47:16 UTC (rev 295)
@@ -1,23 +1,2 @@
-nuitonmatrix.create.matrix.button=Cr\u00E9er une matrice
-nuitonmatrix.create.matrix.message=Dimensions de la matrice (s\u00E9par\u00E9es par ';')
-nuitonmatrix.create.matrix.title=Cr\u00E9er une matrice
-nuitonmatrix.error=Erreur
-nuitonmatrix.error.clipboard.read=Donn\u00E9e corrompu dans le bloc note
-nuitonmatrix.error.clipboard.write=Impossible d'\u00E9crire dans le bloc note
-nuitonmatrix.error.file.read=Impossible de lire le fichier
-nuitonmatrix.error.file.write=Impossible d'\u00E9crire dans le fichier
nuitonmatrix.invalid.element=L'\u00E9l\u00E9ment demand\u00E9 %s n'existe pas dans la matrice %s
nuitonmatrix.invalid.size=La dimension demand\u00E9e n'est pas correcte\: 0 <\= %d <\= %d
-nuitonmatrix.menu.action=Copier/Coller
-nuitonmatrix.menu.action.copy=Copier
-nuitonmatrix.menu.action.copy.selection=Copier la s\u00E9lection
-nuitonmatrix.menu.action.paste=Coller
-nuitonmatrix.menu.action.paste.position=Coller \u00E0 la position courante
-nuitonmatrix.menu.csv=Importer/Exporter fichier CSV
-nuitonmatrix.menu.csv.export.file=Exporter dans un fichier
-nuitonmatrix.menu.csv.export.selection=Exporter la s\u00E9lection
-nuitonmatrix.menu.csv.import.file=Importer depuis un fichier
-nuitonmatrix.menu.csv.import.position=Importer \u00E0 la position courante
-nuitonmatrix.menu.option.semantics=Exporter/Copier avec la s\u00E9mantique
-nuitonmatrix.viewer.renderer.data=Donn\u00E9es
-nuitonmatrix.viewer.sum=Somme
Added: trunk/nuiton-matrix-gui/src/main/resources/i18n/nuiton-matrix-gui_en_GB.properties
===================================================================
--- trunk/nuiton-matrix-gui/src/main/resources/i18n/nuiton-matrix-gui_en_GB.properties (rev 0)
+++ trunk/nuiton-matrix-gui/src/main/resources/i18n/nuiton-matrix-gui_en_GB.properties 2010-12-08 13:47:16 UTC (rev 295)
@@ -0,0 +1,21 @@
+nuitonmatrix.create.matrix.button=New matrix
+nuitonmatrix.create.matrix.message=Matrix size (separate by ';')
+nuitonmatrix.create.matrix.title=New matrix
+nuitonmatrix.error=Error
+nuitonmatrix.error.clipboard.read=Cannot read clipboard
+nuitonmatrix.error.clipboard.write=Cannot write clipboard
+nuitonmatrix.error.file.read=Cannot read file
+nuitonmatrix.error.file.write=Cannot write file
+nuitonmatrix.menu.action=Copy/Paste
+nuitonmatrix.menu.action.copy=Copy
+nuitonmatrix.menu.action.copy.selection=Copy selection
+nuitonmatrix.menu.action.paste=Paste
+nuitonmatrix.menu.action.paste.position=Paste at current position
+nuitonmatrix.menu.csv=Import/Export file CSV
+nuitonmatrix.menu.csv.export.file=Export to file
+nuitonmatrix.menu.csv.export.selection=Export selection
+nuitonmatrix.menu.csv.import.file=Import from file
+nuitonmatrix.menu.csv.import.position=Import at current position
+nuitonmatrix.menu.option.semantics=Export/Copy with semantics
+nuitonmatrix.viewer.renderer.data=Data
+nuitonmatrix.viewer.sum=Sum
Added: trunk/nuiton-matrix-gui/src/main/resources/i18n/nuiton-matrix-gui_fr_FR.properties
===================================================================
--- trunk/nuiton-matrix-gui/src/main/resources/i18n/nuiton-matrix-gui_fr_FR.properties (rev 0)
+++ trunk/nuiton-matrix-gui/src/main/resources/i18n/nuiton-matrix-gui_fr_FR.properties 2010-12-08 13:47:16 UTC (rev 295)
@@ -0,0 +1,21 @@
+nuitonmatrix.create.matrix.button=Cr\u00E9er une matrice
+nuitonmatrix.create.matrix.message=Dimensions de la matrice (s\u00E9par\u00E9es par ';')
+nuitonmatrix.create.matrix.title=Cr\u00E9er une matrice
+nuitonmatrix.error=Erreur
+nuitonmatrix.error.clipboard.read=Donn\u00E9e corrompu dans le bloc note
+nuitonmatrix.error.clipboard.write=Impossible d'\u00E9crire dans le bloc note
+nuitonmatrix.error.file.read=Impossible de lire le fichier
+nuitonmatrix.error.file.write=Impossible d'\u00E9crire dans le fichier
+nuitonmatrix.menu.action=Copier/Coller
+nuitonmatrix.menu.action.copy=Copier
+nuitonmatrix.menu.action.copy.selection=Copier la s\u00E9lection
+nuitonmatrix.menu.action.paste=Coller
+nuitonmatrix.menu.action.paste.position=Coller \u00E0 la position courante
+nuitonmatrix.menu.csv=Importer/Exporter fichier CSV
+nuitonmatrix.menu.csv.export.file=Exporter dans un fichier
+nuitonmatrix.menu.csv.export.selection=Exporter la s\u00E9lection
+nuitonmatrix.menu.csv.import.file=Importer depuis un fichier
+nuitonmatrix.menu.csv.import.position=Importer \u00E0 la position courante
+nuitonmatrix.menu.option.semantics=Exporter/Copier avec la s\u00E9mantique
+nuitonmatrix.viewer.renderer.data=Donn\u00E9es
+nuitonmatrix.viewer.sum=Somme
1
0
Author: echatellier
Date: 2010-12-08 14:39:35 +0100 (Wed, 08 Dec 2010)
New Revision: 294
Url: http://nuiton.org/repositories/revision/nuiton-matrix/294
Log:
Move to multimodules layout
Added:
trunk/nuiton-matrix-gui/src/
trunk/nuiton-matrix-gui/src/main/
trunk/nuiton-matrix-gui/src/main/java/
trunk/nuiton-matrix-gui/src/main/java/org/
trunk/nuiton-matrix-gui/src/main/java/org/nuiton/
trunk/nuiton-matrix-gui/src/main/java/org/nuiton/math/
trunk/nuiton-matrix-gui/src/main/java/org/nuiton/math/matrix/
trunk/nuiton-matrix-gui/src/main/java/org/nuiton/math/matrix/gui/
trunk/nuiton-matrix-gui/src/main/java/org/nuiton/math/matrix/viewer/
trunk/nuiton-matrix-gui/src/main/resources/
trunk/nuiton-matrix-gui/src/test/
trunk/nuiton-matrix-gui/src/test/java/
trunk/nuiton-matrix-gui/src/test/java/org/
trunk/nuiton-matrix-gui/src/test/java/org/nuiton/
trunk/nuiton-matrix-gui/src/test/java/org/nuiton/math/
trunk/nuiton-matrix-gui/src/test/java/org/nuiton/math/matrix/
trunk/nuiton-matrix-gui/src/test/java/org/nuiton/math/matrix/gui/
trunk/nuiton-matrix-gui/src/test/java/org/nuiton/math/matrix/viewer/
trunk/nuiton-matrix-gui/src/test/resources/
Removed:
trunk/nuiton-matrix/src/main/java/org/nuiton/math/matrix/gui/
trunk/nuiton-matrix/src/main/java/org/nuiton/math/matrix/viewer/
trunk/nuiton-matrix/src/test/java/org/nuiton/math/matrix/gui/
trunk/nuiton-matrix/src/test/java/org/nuiton/math/matrix/viewer/
1
0
r293 - in trunk: . nuiton-matrix nuiton-matrix/src nuiton-matrix-gui src
by echatellier@users.nuiton.org 08 Dec '10
by echatellier@users.nuiton.org 08 Dec '10
08 Dec '10
Author: echatellier
Date: 2010-12-08 14:32:51 +0100 (Wed, 08 Dec 2010)
New Revision: 293
Url: http://nuiton.org/repositories/revision/nuiton-matrix/293
Log:
Move to multimodules layout
Added:
trunk/nuiton-matrix-gui/
trunk/nuiton-matrix-gui/pom.xml
trunk/nuiton-matrix/
trunk/nuiton-matrix/pom.xml
trunk/nuiton-matrix/src/
trunk/nuiton-matrix/src/main/
trunk/nuiton-matrix/src/test/
Removed:
trunk/src/main/
trunk/src/test/
Modified:
trunk/pom.xml
Added: trunk/nuiton-matrix/pom.xml
===================================================================
--- trunk/nuiton-matrix/pom.xml (rev 0)
+++ trunk/nuiton-matrix/pom.xml 2010-12-08 13:32:51 UTC (rev 293)
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- ************************************************************* -->
+ <!-- *** POM Relationships *************************************** -->
+ <!-- ************************************************************* -->
+
+ <parent>
+ <groupId>org.nuiton</groupId>
+ <artifactId>mavenpom4redmineAndCentral</artifactId>
+ <version>2.4.1</version>
+ </parent>
+
+ <artifactId>matrix</artifactId>
+ <version>2.1-SNAPSHOT</version>
+
+ <modules>
+ <module>nuiton-matrix</module>
+ <module>nuiton-matrix-gui</module>
+ </modules>
+
+ <dependencyManagement>
+ <dependencies>
+
+ <dependency>
+ <groupId>org.nuiton</groupId>
+ <artifactId>nuiton-utils</artifactId>
+ <version>${nuitonUtilsVersion}</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.nuiton.i18n</groupId>
+ <artifactId>nuiton-i18n</artifactId>
+ <version>${nuitonI18nVersion}</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <!--Jaxx -->
+ <dependency>
+ <groupId>org.nuiton.jaxx</groupId>
+ <artifactId>jaxx-runtime</artifactId>
+ <version>${jaxxVersion}</version>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.help</groupId>
+ <artifactId>javahelp</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.opensymphony</groupId>
+ <artifactId>xwork</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>opensymphony</groupId>
+ <artifactId>ognl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-jxpath</groupId>
+ <artifactId>commons-jxpath</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.swinglabs</groupId>
+ <artifactId>jxlayer</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ </dependencies>
+ </dependencyManagement>
+
+ <!-- ************************************************************* -->
+ <!-- *** Project Information ************************************* -->
+ <!-- ************************************************************* -->
+
+ <name>NuitonMatrix</name>
+ <description>Multiple dimensions matrix library</description>
+ <inceptionYear>2004</inceptionYear>
+ <url>http://maven-site.nuiton.org/nuiton-matrix</url>
+
+ <!-- ************************************************************* -->
+ <!-- *** Build Settings ****************************************** -->
+ <!-- ************************************************************* -->
+
+ <packaging>pom</packaging>
+
+ <properties>
+
+ <jaxxVersion>2.2.3</jaxxVersion>
+ <nuitonUtilsVersion>1.5</nuitonUtilsVersion>
+ <nuitonI18nVersion>2.0</nuitonI18nVersion>
+
+ <!-- extra files to include in release -->
+ <redmine.releaseFiles>${redmine.libReleaseFiles}</redmine.releaseFiles>
+
+ </properties>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton.jaxx</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <version>${jaxxVersion}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.nuiton.i18n</groupId>
+ <artifactId>maven-i18n-plugin</artifactId>
+ <version>${nuitonI18nVersion}</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-site-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>org.nuiton.jrst</groupId>
+ <artifactId>doxia-module-jrst</artifactId>
+ <version>${jrstPluginVersion}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
+ </build>
+
+ <!-- ************************************************************* -->
+ <!-- *** Build Environment ************************************** -->
+ <!-- ************************************************************* -->
+
+ <!-- Source control management. -->
+ <scm>
+ <connection>scm:svn:http://svn.nuiton.org/svn/nuiton-matrix/trunk</connection>
+ <developerConnection>scm:svn:http://svn.nuiton.org/svn/nuiton-matrix/trunk</developerConnection>
+ <url>http://www.nuiton.org/repositories/browse/nuiton-matrix/trunk</url>
+ </scm>
+</project>
Added: trunk/nuiton-matrix-gui/pom.xml
===================================================================
--- trunk/nuiton-matrix-gui/pom.xml (rev 0)
+++ trunk/nuiton-matrix-gui/pom.xml 2010-12-08 13:32:51 UTC (rev 293)
@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- ************************************************************* -->
+ <!-- *** POM Relationships *************************************** -->
+ <!-- ************************************************************* -->
+
+ <parent>
+ <groupId>org.nuiton</groupId>
+ <artifactId>matrix</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.nuiton.matrix</groupId>
+ <artifactId>nuiton-matrix-gui</artifactId>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.nuiton.matrix</groupId>
+ <artifactId>nuiton-matrix</artifactId>
+ <version>${project.version}</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.nuiton</groupId>
+ <artifactId>nuiton-utils</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.nuiton.i18n</groupId>
+ <artifactId>nuiton-i18n</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.nuiton.jaxx</groupId>
+ <artifactId>jaxx-runtime</artifactId>
+ </dependency>
+
+ </dependencies>
+
+
+ <!-- ************************************************************* -->
+ <!-- *** Build Settings ****************************************** -->
+ <!-- ************************************************************* -->
+
+ <packaging>jar</packaging>
+
+ <properties>
+
+ <!-- extra files to include in release -->
+ <redmine.releaseFiles>${redmine.libReleaseFiles}</redmine.releaseFiles>
+
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton.jaxx</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <id>generate-ui</id>
+ <configuration>
+ <extraImportList>jaxx.runtime.SwingUtil,static jaxx.runtime.JAXXUtil.getStringValue</extraImportList>
+ <addSourcesToClassPath>true</addSourcesToClassPath>
+ <addProjectClassPath>true</addProjectClassPath>
+ </configuration>
+ </execution>
+ <execution>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <id>generate-tests</id>
+ <phase>generate-test-sources</phase>
+ <configuration>
+ <testPhase>true</testPhase>
+ <src>src/test/java</src>
+ <outJava>target/generated-sources/test-java</outJava>
+ <addProjectClassPath>true</addProjectClassPath>
+ <addCompileClassPath>true</addCompileClassPath>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.nuiton.i18n</groupId>
+ <artifactId>maven-i18n-plugin</artifactId>
+ <configuration>
+ <entries>
+ <entry>
+ <basedir>${project.build.directory}/generated-sources/java/</basedir>
+ </entry>
+ </entries>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>parserJava</goal>
+ <goal>gen</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+
+ </build>
+
+ <!-- ************************************************************* -->
+ <!-- *** Build Environment ************************************** -->
+ <!-- ************************************************************* -->
+
+ <profiles>
+
+ <!-- create assemblies only at release time -->
+ <profile>
+ <id>assembly-profile</id>
+ <activation>
+ <property>
+ <name>performRelease</name>
+ <value>true</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <!-- launch in a release the assembly automatically -->
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>create-assemblies</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <attach>false</attach>
+ <descriptorRefs>
+ <descriptorRef>deps</descriptorRef>
+ <descriptorRef>full</descriptorRef>
+ </descriptorRefs>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-12-08 11:13:06 UTC (rev 292)
+++ trunk/pom.xml 2010-12-08 13:32:51 UTC (rev 293)
@@ -13,82 +13,64 @@
<version>2.4.1</version>
</parent>
- <artifactId>nuiton-matrix</artifactId>
+ <artifactId>matrix</artifactId>
<version>2.1-SNAPSHOT</version>
- <dependencies>
+ <modules>
+ <module>nuiton-matrix</module>
+ <module>nuiton-matrix-gui</module>
+ </modules>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
+ <dependencyManagement>
+ <dependencies>
- <dependency>
- <groupId>org.nuiton</groupId>
- <artifactId>nuiton-utils</artifactId>
- <version>${nuitonUtilsVersion}</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.nuiton.i18n</groupId>
- <artifactId>nuiton-i18n</artifactId>
- <version>${nuitonI18nVersion}</version>
- <scope>compile</scope>
- </dependency>
+ <dependency>
+ <groupId>org.nuiton</groupId>
+ <artifactId>nuiton-utils</artifactId>
+ <version>${nuitonUtilsVersion}</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.nuiton.i18n</groupId>
+ <artifactId>nuiton-i18n</artifactId>
+ <version>${nuitonI18nVersion}</version>
+ <scope>compile</scope>
+ </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- </dependency>
+ <!--Jaxx -->
+ <dependency>
+ <groupId>org.nuiton.jaxx</groupId>
+ <artifactId>jaxx-runtime</artifactId>
+ <version>${jaxxVersion}</version>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.help</groupId>
+ <artifactId>javahelp</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.opensymphony</groupId>
+ <artifactId>xwork</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>opensymphony</groupId>
+ <artifactId>ognl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-jxpath</groupId>
+ <artifactId>commons-jxpath</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.swinglabs</groupId>
+ <artifactId>jxlayer</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
- <dependency>
- <groupId>commons-beanutils</groupId>
- <artifactId>commons-beanutils</artifactId>
- </dependency>
-
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </dependency>
+ </dependencies>
+ </dependencyManagement>
- <dependency>
- <groupId>commons-primitives</groupId>
- <artifactId>commons-primitives</artifactId>
- </dependency>
-
- <!--Jaxx -->
- <dependency>
- <groupId>org.nuiton.jaxx</groupId>
- <artifactId>jaxx-runtime</artifactId>
- <version>${jaxxVersion}</version>
- <scope>compile</scope>
- <exclusions>
- <exclusion>
- <groupId>javax.help</groupId>
- <artifactId>javahelp</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.opensymphony</groupId>
- <artifactId>xwork</artifactId>
- </exclusion>
- <exclusion>
- <groupId>opensymphony</groupId>
- <artifactId>ognl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>commons-jxpath</groupId>
- <artifactId>commons-jxpath</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.swinglabs</groupId>
- <artifactId>jxlayer</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- </dependencies>
-
<!-- ************************************************************* -->
<!-- *** Project Information ************************************* -->
<!-- ************************************************************* -->
@@ -102,7 +84,7 @@
<!-- *** Build Settings ****************************************** -->
<!-- ************************************************************* -->
- <packaging>jar</packaging>
+ <packaging>pom</packaging>
<properties>
@@ -141,61 +123,6 @@
</plugins>
</pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.nuiton.jaxx</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>generate</goal>
- </goals>
- <id>generate-ui</id>
- <configuration>
- <extraImportList>jaxx.runtime.SwingUtil,static jaxx.runtime.JAXXUtil.getStringValue</extraImportList>
- <addSourcesToClassPath>true</addSourcesToClassPath>
- <addProjectClassPath>true</addProjectClassPath>
- </configuration>
- </execution>
- <execution>
- <goals>
- <goal>generate</goal>
- </goals>
- <id>generate-tests</id>
- <phase>generate-test-sources</phase>
- <configuration>
- <testPhase>true</testPhase>
- <src>src/test/java</src>
- <outJava>target/generated-sources/test-java</outJava>
- <addProjectClassPath>true</addProjectClassPath>
- <addCompileClassPath>true</addCompileClassPath>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <!-- plugin i18n -->
- <plugin>
- <groupId>org.nuiton.i18n</groupId>
- <artifactId>maven-i18n-plugin</artifactId>
- <configuration>
- <entries>
- <entry>
- <basedir>${project.build.directory}/generated-sources/java/</basedir>
- </entry>
- </entries>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>parserJava</goal>
- <goal>gen</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
-
</build>
<!-- ************************************************************* -->
@@ -208,42 +135,4 @@
<developerConnection>scm:svn:http://svn.nuiton.org/svn/nuiton-matrix/trunk</developerConnection>
<url>http://www.nuiton.org/repositories/browse/nuiton-matrix/trunk</url>
</scm>
-
- <profiles>
-
- <!-- create assemblies only at release time -->
- <profile>
- <id>assembly-profile</id>
- <activation>
- <property>
- <name>performRelease</name>
- <value>true</value>
- </property>
- </activation>
- <build>
- <plugins>
- <!-- launch in a release the assembly automatically -->
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <executions>
- <execution>
- <id>create-assemblies</id>
- <phase>verify</phase>
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <attach>false</attach>
- <descriptorRefs>
- <descriptorRef>deps</descriptorRef>
- <descriptorRef>full</descriptorRef>
- </descriptorRefs>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
</project>
1
0
r292 - in trunk/src: main/java/org/nuiton/math/matrix main/java/org/nuiton/math/matrix/viewer main/java/org/nuiton/math/matrix/viewer/renderer main/resources main/resources/i18n main/resources/icons test/java/org/nuiton/math/matrix test/java/org/nuiton/math/matrix/viewer
by echatellier@users.nuiton.org 08 Dec '10
by echatellier@users.nuiton.org 08 Dec '10
08 Dec '10
Author: echatellier
Date: 2010-12-08 12:13:06 +0100 (Wed, 08 Dec 2010)
New Revision: 292
Url: http://nuiton.org/repositories/revision/nuiton-matrix/292
Log:
Viewer component : first draft
Added:
trunk/src/main/java/org/nuiton/math/matrix/viewer/
trunk/src/main/java/org/nuiton/math/matrix/viewer/MatrixDimensionPanel.java
trunk/src/main/java/org/nuiton/math/matrix/viewer/MatrixRenderer.java
trunk/src/main/java/org/nuiton/math/matrix/viewer/MatrixRendererSolution.java
trunk/src/main/java/org/nuiton/math/matrix/viewer/MatrixViewerPanel.java
trunk/src/main/java/org/nuiton/math/matrix/viewer/renderer/
trunk/src/main/java/org/nuiton/math/matrix/viewer/renderer/MatrixInfoTableModel.java
trunk/src/main/java/org/nuiton/math/matrix/viewer/renderer/MatrixInfoTableRenderer.java
trunk/src/main/resources/icons/
trunk/src/main/resources/icons/1rightarrow.png
trunk/src/main/resources/icons/sigma-barre.gif
trunk/src/main/resources/icons/sigma.gif
trunk/src/main/resources/icons/table.png
trunk/src/test/java/org/nuiton/math/matrix/viewer/
trunk/src/test/java/org/nuiton/math/matrix/viewer/MatrixViewerPanelTest.java
Modified:
trunk/src/main/resources/i18n/nuiton-matrix_en_GB.properties
trunk/src/main/resources/i18n/nuiton-matrix_fr_FR.properties
Added: trunk/src/main/java/org/nuiton/math/matrix/viewer/MatrixDimensionPanel.java
===================================================================
--- trunk/src/main/java/org/nuiton/math/matrix/viewer/MatrixDimensionPanel.java (rev 0)
+++ trunk/src/main/java/org/nuiton/math/matrix/viewer/MatrixDimensionPanel.java 2010-12-08 11:13:06 UTC (rev 292)
@@ -0,0 +1,287 @@
+/*
+ * #%L
+ *
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * %%
+ * 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 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 Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+package org.nuiton.math.matrix.viewer;
+
+import static org.nuiton.i18n.I18n._;
+
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.GridLayout;
+import java.awt.Insets;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.swing.DefaultListModel;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JToggleButton;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.nuiton.math.matrix.AbstractMatrixND;
+import org.nuiton.math.matrix.MatrixND;
+import org.nuiton.util.Resource;
+
+/**
+ * Panel d'affichage des dimensions.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class MatrixDimensionPanel extends JPanel {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = -1919447532660452240L;
+
+ /** Class logger. */
+ private static Log log = LogFactory.getLog(AbstractMatrixND.class);
+
+ /** Matrix to display (original). */
+ protected MatrixND matrix;
+
+ protected List<SubDimensionPanel> subPanelList;
+
+ public MatrixDimensionPanel() {
+ setLayout(new GridLayout(0, 1));
+ subPanelList = new ArrayList<MatrixDimensionPanel.SubDimensionPanel>();
+ }
+
+ public MatrixND getMatrix() {
+ return matrix;
+ }
+
+ public void setMatrix(MatrixND matrix) {
+ this.matrix = matrix;
+
+ buildDimensionPanel();
+ validate();
+ repaint();
+ }
+
+ public MatrixND getModifiedMatrix() {
+ MatrixND reducedMatrix = createAndReduce(matrix);
+ return reducedMatrix;
+ }
+
+ protected static class SubDimensionPanel extends JPanel {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 9170588695850504050L;
+
+ protected String semanticName;
+
+ protected List<?> semantic;
+
+ protected JToggleButton sumAll;
+
+ protected JList semList;
+
+ public SubDimensionPanel(String semanticName, List<?> semantic) {
+ super(new GridBagLayout());
+ this.semanticName = semanticName;
+ this.semantic = semantic;
+ renderSubPanel();
+ }
+
+ protected void renderSubPanel() {
+ // semantic name
+ JLabel semName = new JLabel(semanticName);
+ add(semName, new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.CENTER,
+ GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
+
+ // sum all button
+ sumAll = new JToggleButton(Resource.getIcon("/icons/sigma-barre.gif"));
+ sumAll.setSelectedIcon(Resource.getIcon("/icons/sigma.gif"));
+ add(sumAll, new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.WEST,
+ GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
+
+ // semantic list
+ semList = new JList();
+ SemanticListModel semModel = new SemanticListModel(semantic);
+ semList.setModel(semModel);
+ add(new JScrollPane(semList), new GridBagConstraints(0, 1, 2, 1, 1, 1, GridBagConstraints.WEST,
+ GridBagConstraints.BOTH, new Insets(0, 0, 5, 0), 0, 0));
+ }
+
+ public JList getList() {
+ return semList;
+ }
+
+ /**
+ * Method getSumStep indique le pas d'increment pour la somme sur
+ * la dimension.
+ *
+ * @return -1 indique de faire la somme sur tous les elmements. 1
+ * indique de faire la somme 1 a 1 (donc de ne pas faire de
+ * somme), 2 indiques de faire la somme 2 a 2, ...
+ */
+ public int getSumStep() {
+ int result = 1;
+ if (sumAll.isSelected()) {
+ result = -1;
+ }
+ return result;
+ }
+ }
+
+ /**
+ * Build dimension panel.
+ */
+ protected void buildDimensionPanel() {
+ subPanelList.clear();
+ removeAll();
+
+ if (matrix != null) {
+ int index = 0;
+ for (List<?> semantic : matrix.getSemantics()) {
+ SubDimensionPanel dimPanel = new SubDimensionPanel(_(matrix.getDimensionName(index)), semantic);
+ add(dimPanel);
+ subPanelList.add(dimPanel);
+ index++;
+ }
+ }
+ }
+
+ public static class SemanticListModel extends DefaultListModel {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 4384624824457446070L;
+
+ protected List<?> semantic;
+
+ public SemanticListModel(List<?> semantic) {
+ this.semantic = semantic;
+ }
+
+ @Override
+ public int getSize() {
+ return semantic.size();
+ }
+
+ @Override
+ public Object getElementAt(int index) {
+ return semantic.get(index);
+ }
+ }
+
+ protected MatrixND createAndReduce(MatrixND matrix) {
+
+ // Reduit la matrice en fonction des choix de l utilisateur
+ // dans les autres InfoItem recuperation des autres elements
+ // selectionnees.
+ for (int i = 0; i < subPanelList.size(); i++) {
+ SubDimensionPanel subDimPanel = subPanelList.get(i);
+ JList list = subDimPanel.getList();
+ int [] indList = list.getSelectedIndices();
+
+ if (indList.length == 0) {
+ // si rien n'est selectionné on selectionne tout
+ list.setSelectionInterval(0, list.getModel().getSize()-1);
+ indList = list.getSelectedIndices();
+ }
+
+ if (log.isDebugEnabled()) {
+ log.debug("matrice avant submatrice de la dim " + i + ": " + matrix);
+ }
+
+ if (0 < indList.length && indList.length < matrix.getDim(i)) {
+ matrix = matrix.getSubMatrix(i, indList);
+ }
+
+ if (log.isDebugEnabled()) {
+ log.debug("matrice apres submatrice de la dim " + i + ": " + matrix);
+ }
+
+ if (subDimPanel.getSumStep() != 1) {
+ // on somme
+ matrix = matrix.sumOverDim(i, subDimPanel.getSumStep());
+ if (matrix.getDim(i) == 1) {
+ // c une somme global sur tous les elements
+ matrix.setDimensionName(i, _("nuitonmatrix.viewer.sum"));
+ } else {
+ // c une somme partielle
+ String name = matrix.getDimensionName(i) + " " + _("nuitonmatrix.viewer.sum");
+
+ /* FIXME echatellier somme par autre interval que -1
+ //si c une somme pour les annees, on change l'intitule
+ if (item instanceof InfoItemDate){
+ name = _ ("isisfish.common.year");
+ }*/
+
+ matrix.setDimensionName(i, name);
+ }
+
+ /* FIXME echatellier somme par autre interval que -1
+ // #1905 : modifie les semantiques de type Date pour que lorsque
+ // c'est par exemple une somme par année
+ // les semantique se nomment
+ // janvier 0, janvier 1...
+ // plutot que
+ // janvier 0, fevrier 0...
+ Object sem = matrix.getSemantics(i);
+ if (sem instanceof List) {
+ List<Object> semList = (List<Object>)sem;
+ List<Object> newList = new ArrayList<Object>();
+ for (int index = 0 ; index < semList.size(); ++index) {
+ Object semObject = semList.get(index);
+ if (semObject instanceof Date) {
+ Date semDate = (Date)semObject;
+ Date newDate = new Date(semDate.getDate() * item.getSumStep());
+ newList.add(newDate);
+ }
+ else {
+ newList.add(semObject);
+ }
+ }
+ matrix.setSemantics(i, newList);
+ }
+ // end semantics modification */
+ }
+
+ if (log.isDebugEnabled()) {
+ log.debug("matrice apres sum de la dim " + i + ": " + matrix);
+ }
+ }
+
+ if (log.isDebugEnabled()) {
+ log.debug("Matrice avant le reduce: " + matrix);
+ }
+
+ // arrive ici on a une matrice qui a des tailles de dimension 1
+ // et un tableau des legende pour chaque dimension
+
+ // il faut que la matrice est 2 dimensions
+ // reduction de la matrice
+ MatrixND result = matrix.reduce(2);
+
+ return result;
+ }
+}
Property changes on: trunk/src/main/java/org/nuiton/math/matrix/viewer/MatrixDimensionPanel.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/src/main/java/org/nuiton/math/matrix/viewer/MatrixRenderer.java
===================================================================
--- trunk/src/main/java/org/nuiton/math/matrix/viewer/MatrixRenderer.java (rev 0)
+++ trunk/src/main/java/org/nuiton/math/matrix/viewer/MatrixRenderer.java 2010-12-08 11:13:06 UTC (rev 292)
@@ -0,0 +1,66 @@
+/*
+ * #%L
+ *
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * %%
+ * 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 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 Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+package org.nuiton.math.matrix.viewer;
+
+import java.awt.Component;
+
+import javax.swing.Icon;
+
+import org.nuiton.math.matrix.MatrixND;
+
+/**
+ * Matrix renderer plugin interface.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public interface MatrixRenderer {
+
+ /**
+ * Renderer panel for matrix.
+ *
+ * @param matrix matrix to display
+ * @return component
+ */
+ Component getPanel(MatrixND matrix);
+
+ /**
+ * Renderer icon (used in {@link MatrixRendererSolution#ICON} rendering).
+ *
+ * @return plugin icon
+ */
+ Icon getIcon();
+
+ /**
+ * Renderer name (used in {@link MatrixRendererSolution#RADIO_BUTTON} rendering).
+ *
+ * @return plugin name
+ */
+ String getName();
+}
Property changes on: trunk/src/main/java/org/nuiton/math/matrix/viewer/MatrixRenderer.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/src/main/java/org/nuiton/math/matrix/viewer/MatrixRendererSolution.java
===================================================================
--- trunk/src/main/java/org/nuiton/math/matrix/viewer/MatrixRendererSolution.java (rev 0)
+++ trunk/src/main/java/org/nuiton/math/matrix/viewer/MatrixRendererSolution.java 2010-12-08 11:13:06 UTC (rev 292)
@@ -0,0 +1,44 @@
+/*
+ * #%L
+ *
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * %%
+ * 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 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 Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+package org.nuiton.math.matrix.viewer;
+
+/**
+ * Matrix renderer list solution.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public enum MatrixRendererSolution {
+
+ /** Renderering with icons. */
+ ICON,
+
+ /** Renderering with radion button. */
+ RADIO_BUTTON
+}
Property changes on: trunk/src/main/java/org/nuiton/math/matrix/viewer/MatrixRendererSolution.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/src/main/java/org/nuiton/math/matrix/viewer/MatrixViewerPanel.java
===================================================================
--- trunk/src/main/java/org/nuiton/math/matrix/viewer/MatrixViewerPanel.java (rev 0)
+++ trunk/src/main/java/org/nuiton/math/matrix/viewer/MatrixViewerPanel.java 2010-12-08 11:13:06 UTC (rev 292)
@@ -0,0 +1,392 @@
+/*
+ * #%L
+ *
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * %%
+ * 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 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 Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+package org.nuiton.math.matrix.viewer;
+
+import static org.nuiton.i18n.I18n._;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.swing.ButtonGroup;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.DefaultListCellRenderer;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JList;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JSplitPane;
+import javax.swing.JToggleButton.ToggleButtonModel;
+
+import org.nuiton.math.matrix.MatrixND;
+import org.nuiton.util.Resource;
+
+/**
+ * Panel that can display matrix list details (dimension) and rendering solutions.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class MatrixViewerPanel extends JPanel implements ActionListener {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = -5447856858278176837L;
+
+ public static final String PROPERTY_MATRIX_COMBO_VISIBLE = "matrixComboVisible";
+
+ public static final String PROPERTY_MATRIX_RENDERER_SOLUTION = "matrixRendererSolution";
+
+ public static final String PROPERTY_MATRIX_RENDERERS = "matrixRenderers";
+
+ public static final String PROPERTY_MATRICES = "matrices";
+
+ /** Matrix list combo visibility (defaut to false). */
+ protected boolean matrixComboVisible;
+
+ /** Matrix renderer list solution. (default to {@link MatrixRendererSolution#RADIO_BUTTON} */
+ protected MatrixRendererSolution matrixRendererSolution = MatrixRendererSolution.RADIO_BUTTON;
+
+ /** Matrix renderer plugins. */
+ protected List<MatrixRenderer> matrixRenderers;
+
+ /** Matrices to render (depend on {@link #matrixComboVisible} to {@code true}). */
+ protected List<MatrixND> matrices;
+
+ /** Matrix list combo box. */
+ protected MatrixComboBox matrixComboBox;
+
+ protected MatrixDimensionPanel dimensionPanel;
+
+ protected RadioButtonRenderingPanel radioPanel;
+
+ protected JPanel renderingComponentContainer;
+
+ public MatrixViewerPanel() {
+ matrixRenderers = new ArrayList<MatrixRenderer>();
+ matrices = new ArrayList<MatrixND>();
+
+ buildPanel();
+ }
+
+ protected boolean isMatrixComboVisible() {
+ return matrixComboVisible;
+ }
+
+ public void setMatrixComboVisible(boolean matrixComboVisible) {
+ boolean oldValue = this.matrixComboVisible;
+ this.matrixComboVisible = matrixComboVisible;
+ firePropertyChange(PROPERTY_MATRIX_COMBO_VISIBLE, oldValue, matrixComboVisible);
+ }
+
+ public MatrixRendererSolution getMatrixRendererSolution() {
+ return matrixRendererSolution;
+ }
+
+ public void setMatrixRendererSolution(MatrixRendererSolution matrixRendererSolution) {
+ MatrixRendererSolution oldValue = this.matrixRendererSolution;
+ this.matrixRendererSolution = matrixRendererSolution;
+ firePropertyChange(PROPERTY_MATRIX_RENDERER_SOLUTION, oldValue, matrixRendererSolution);
+ }
+
+ public boolean addMatrixRenderer(MatrixRenderer matrixRenderer) {
+ boolean result = matrixRenderers.add(matrixRenderer);
+ firePropertyChange(PROPERTY_MATRIX_RENDERERS, null, matrixRenderers);
+ return result;
+ }
+
+ public boolean removeMatrixRenderer(Object matrixRenderer) {
+ boolean result = matrixRenderers.remove(matrixRenderer);
+ firePropertyChange(PROPERTY_MATRIX_RENDERERS, null, matrixRenderers);
+ return result;
+ }
+
+ public void addMatrix(MatrixND... matrices) {
+ for (MatrixND matrix : matrices) {
+ this.matrices.add(matrix);
+ }
+ firePropertyChange(PROPERTY_MATRICES, null, matrices);
+ }
+
+ public void removeMatrix(Object... matrices) {
+ for (Object matrix : matrices) {
+ this.matrices.remove(matrix);
+ }
+ firePropertyChange(PROPERTY_MATRICES, null, matrices);
+ }
+
+ public void clearMatrix() {
+ matrices.clear();
+ firePropertyChange(PROPERTY_MATRICES, null, matrices);
+ }
+
+ /** Matrix list combo box. */
+ protected class MatrixComboBox extends JComboBox implements PropertyChangeListener, ItemListener {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = -3166642639854195273L;
+
+ public MatrixComboBox() {
+ addItemListener(this);
+ }
+
+ /*
+ * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent)
+ */
+ @Override
+ public void propertyChange(PropertyChangeEvent evt) {
+ setVisible(matrixComboVisible);
+ }
+
+ /*
+ * @see java.awt.event.ItemListener#itemStateChanged(java.awt.event.ItemEvent)
+ */
+ @Override
+ public void itemStateChanged(ItemEvent e) {
+ dimensionPanel.setMatrix((MatrixND)getSelectedItem());
+ }
+ }
+
+ /** Matrix list combo box model. */
+ protected class MatrixComboBoxModel extends DefaultComboBoxModel implements PropertyChangeListener {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 4294576545040155208L;
+
+ @Override
+ public int getSize() {
+ int result = matrices.size();
+ return result;
+ }
+
+ @Override
+ public Object getElementAt(int index) {
+ Object matrix = matrices.get(index);
+ return matrix;
+ }
+
+ /*
+ * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent)
+ */
+ @Override
+ public void propertyChange(PropertyChangeEvent evt) {
+ fireContentsChanged(this, 0, matrices.size() - 1);
+
+ if (getSelectedItem() == null && getSize() > 0) {
+ setSelectedItem(getElementAt(0));
+ }
+ }
+ }
+
+ /** Matrix list combo renderer. */
+ protected static class MatrixComboRenderer extends DefaultListCellRenderer {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 6151127818315270895L;
+
+ @Override
+ public Component getListCellRendererComponent(JList list, Object value,
+ int index, boolean isSelected, boolean cellHasFocus) {
+
+ MatrixND matrix = (MatrixND)value;
+ String matrixName = null;
+ if (matrix != null) {
+ matrixName = _(matrix.getName());
+ }
+ return super.getListCellRendererComponent(list, matrixName, index, isSelected, cellHasFocus);
+ }
+ }
+
+ /** Button model from button containing rendered instance. */
+ protected static class RendererButtonModel extends ToggleButtonModel {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = -5737246124430280412L;
+
+ protected MatrixRenderer renderer;
+
+ public RendererButtonModel(MatrixRenderer renderer) {
+ this.renderer = renderer;
+ }
+
+ public MatrixRenderer getRenderer() {
+ return renderer;
+ }
+ }
+
+ /** Radio button rendering panel. */
+ protected class RadioButtonRenderingPanel extends JPanel implements PropertyChangeListener{
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = -6312518069621077533L;
+
+ protected ButtonGroup buttonGroup;
+
+ public RadioButtonRenderingPanel() {
+ super(new GridLayout(1, 0));
+ }
+
+ /*
+ * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent)
+ */
+ @Override
+ public void propertyChange(PropertyChangeEvent evt) {
+ rebuildPanel();
+ validate();
+ repaint();
+ }
+
+ /**
+ * Rebuild radio button lists.
+ */
+ protected void rebuildPanel() {
+ removeAll();
+ if (matrixRendererSolution == MatrixRendererSolution.RADIO_BUTTON) {
+
+ buttonGroup = new ButtonGroup();
+ for (MatrixRenderer renderer : matrixRenderers) {
+ JRadioButton radioButton = new JRadioButton(renderer.getName());
+ radioButton.setModel(new RendererButtonModel(renderer));
+ buttonGroup.add(radioButton);
+ add(radioButton);
+ }
+
+ setVisible(true);
+ }
+ else {
+ setVisible(false);
+ }
+ }
+
+ public MatrixRenderer getSelectedRender() {
+ MatrixRenderer renderer = ((RendererButtonModel)buttonGroup.getSelection()).getRenderer();
+ return renderer;
+ }
+ }
+
+ /**
+ * Build main panel.
+ */
+ protected void buildPanel() {
+
+ setLayout(new BorderLayout());
+
+ // split main ui left/rigth
+ JPanel editionSidePanel = new JPanel(new BorderLayout());
+ JPanel renderSidePanel = new JPanel(new BorderLayout());
+ JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, editionSidePanel, renderSidePanel);
+ mainSplitPane.setDividerLocation(0.3);
+ add(mainSplitPane, BorderLayout.CENTER);
+
+ // matrix list combo
+ matrixComboBox = new MatrixComboBox();
+ MatrixComboBoxModel matrixListComboBoxModel = new MatrixComboBoxModel();
+ matrixComboBox.setModel(matrixListComboBoxModel);
+ matrixComboBox.setRenderer(new MatrixComboRenderer());
+ addPropertyChangeListener(PROPERTY_MATRIX_COMBO_VISIBLE, matrixComboBox);
+ addPropertyChangeListener(PROPERTY_MATRICES, matrixListComboBoxModel);
+ editionSidePanel.add(matrixComboBox, BorderLayout.NORTH);
+
+ // panel d'affichage des dimensions
+ dimensionPanel = new MatrixDimensionPanel();
+ editionSidePanel.add(dimensionPanel, BorderLayout.CENTER);
+
+ // fleche de d'action de rendu
+ JButton renderButton = new JButton(Resource.getIcon("/icons/1rightarrow.png"));
+ renderButton.setActionCommand("render");
+ renderButton.addActionListener(this);
+
+ editionSidePanel.add(renderButton, BorderLayout.EAST);
+
+ // render type : icon
+
+ // render type : combo box
+
+ // current rendering pane
+ renderingComponentContainer = new JPanel(new BorderLayout());
+ renderSidePanel.add(renderingComponentContainer, BorderLayout.CENTER);
+
+ // render type : radio button
+ radioPanel = new RadioButtonRenderingPanel();
+ renderSidePanel.add(radioPanel, BorderLayout.SOUTH);
+ addPropertyChangeListener(PROPERTY_MATRIX_RENDERER_SOLUTION, radioPanel);
+ addPropertyChangeListener(PROPERTY_MATRIX_RENDERERS, radioPanel);
+ }
+
+
+ /*
+ * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
+ */
+ @Override
+ public void actionPerformed(ActionEvent e) {
+
+ String actionCommand = e.getActionCommand();
+
+ if ("render".equalsIgnoreCase(actionCommand)) {
+
+ // get selected renderer
+ MatrixRenderer renderer = null;
+ switch (matrixRendererSolution) {
+ case RADIO_BUTTON:
+ renderer = radioPanel.getSelectedRender();
+ break;
+ default :
+
+ }
+
+ // get matrix to display
+ MatrixND matrix = dimensionPanel.getModifiedMatrix();
+
+ // renderer matrix
+ Component component = renderer.getPanel(matrix);
+ setRenderingComponent(component);
+ }
+
+ }
+
+ /**
+ * Set rendering component in rendering container.
+ *
+ * @param component component to install
+ */
+ protected void setRenderingComponent(Component component) {
+ renderingComponentContainer.removeAll();
+ renderingComponentContainer.add(component, BorderLayout.CENTER);
+ renderingComponentContainer.validate();
+ renderingComponentContainer.repaint();
+ }
+}
Property changes on: trunk/src/main/java/org/nuiton/math/matrix/viewer/MatrixViewerPanel.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/src/main/java/org/nuiton/math/matrix/viewer/renderer/MatrixInfoTableModel.java
===================================================================
--- trunk/src/main/java/org/nuiton/math/matrix/viewer/renderer/MatrixInfoTableModel.java (rev 0)
+++ trunk/src/main/java/org/nuiton/math/matrix/viewer/renderer/MatrixInfoTableModel.java 2010-12-08 11:13:06 UTC (rev 292)
@@ -0,0 +1,104 @@
+/*
+ * #%L
+ * IsisFish
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2002 - 2010 Ifremer, CodeLutin
+ * %%
+ * 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/gpl-2.0.html>.
+ * #L%
+ */
+package org.nuiton.math.matrix.viewer.renderer;
+
+import org.nuiton.math.matrix.MatrixND;
+import org.nuiton.math.matrix.MatrixException;
+import javax.swing.table.AbstractTableModel;
+
+/**
+ * Matrix info table model.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class MatrixInfoTableModel extends AbstractTableModel {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 2632133167225155487L;
+
+ protected MatrixND matrix;
+
+ public MatrixInfoTableModel(MatrixND mat) {
+ if (mat.getDimCount() > 2) {
+ throw new MatrixException(
+ "matrice with more than 2 dimension not supported.");
+ }
+ this.matrix = mat;
+ }
+
+ /**
+ * @return Le nombre de lignes de la table.
+ */
+ public int getRowCount() {
+ if (matrix == null || matrix.getDimCount() < 1) {
+ return 0;
+ } else {
+ return matrix.getDim(0);
+ }
+ }
+
+ /**
+ * @return Le nombre de colonnes de la table.
+ */
+ public int getColumnCount() {
+ if (matrix == null || matrix.getDimCount() < 1) {
+ return 0;
+ } else {
+ return matrix.getDim(1) + 1;
+ }
+ }
+
+ /**
+ * @param row La ligne
+ * @param column La colonnes
+ * @return L'Object correspondant dans la matrice.
+ */
+ public Object getValueAt(int row, int column) {
+ if (column == 0) {
+ Object obj = matrix.getSemantic(0).get(row);
+ return obj;
+ } else {
+ if (matrix.getDimCount() == 1) {
+ return String.valueOf(matrix.getValue(column - 1));
+ } else {
+ return String.valueOf(matrix.getValue(row, column - 1));
+ }
+ }
+ }
+
+ public String getColumnName(int column) {
+ if (column == 0) {
+ return matrix.getDimensionName(0) + "\\"
+ + matrix.getDimensionName(1);
+ } else {
+ return "" + matrix.getSemantic(1).get(column - 1);
+ }
+ }
+
+}// MatrixInfoTableModel
Property changes on: trunk/src/main/java/org/nuiton/math/matrix/viewer/renderer/MatrixInfoTableModel.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/src/main/java/org/nuiton/math/matrix/viewer/renderer/MatrixInfoTableRenderer.java
===================================================================
--- trunk/src/main/java/org/nuiton/math/matrix/viewer/renderer/MatrixInfoTableRenderer.java (rev 0)
+++ trunk/src/main/java/org/nuiton/math/matrix/viewer/renderer/MatrixInfoTableRenderer.java 2010-12-08 11:13:06 UTC (rev 292)
@@ -0,0 +1,79 @@
+/*
+ * #%L
+ *
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * %%
+ * 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 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 Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+package org.nuiton.math.matrix.viewer.renderer;
+
+import static org.nuiton.i18n.I18n._;
+
+import java.awt.Component;
+
+import javax.swing.Icon;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+
+import org.nuiton.math.matrix.MatrixND;
+import org.nuiton.math.matrix.viewer.MatrixRenderer;
+import org.nuiton.util.Resource;
+
+/**
+ * Matrix info table renderer.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class MatrixInfoTableRenderer implements MatrixRenderer {
+
+ /*
+ * @see org.nuiton.math.matrix.viewer.MatrixRenderer#getPanel(org.nuiton.math.matrix.MatrixND)
+ */
+ @Override
+ public Component getPanel(MatrixND matrix) {
+
+ JTable table = new JTable();
+ table.setModel(new MatrixInfoTableModel(matrix));
+ return new JScrollPane(table);
+ }
+
+ /*
+ * @see org.nuiton.math.matrix.viewer.MatrixRenderer#getIcon()
+ */
+ @Override
+ public Icon getIcon() {
+ return Resource.getIcon("/icons/table.png");
+ }
+
+ /*
+ * @see org.nuiton.math.matrix.viewer.MatrixRenderer#getName()
+ */
+ @Override
+ public String getName() {
+ return _("nuitonmatrix.viewer.renderer.data");
+ }
+
+
+}
Property changes on: trunk/src/main/java/org/nuiton/math/matrix/viewer/renderer/MatrixInfoTableRenderer.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/src/main/resources/i18n/nuiton-matrix_en_GB.properties
===================================================================
--- trunk/src/main/resources/i18n/nuiton-matrix_en_GB.properties 2010-12-07 09:17:30 UTC (rev 291)
+++ trunk/src/main/resources/i18n/nuiton-matrix_en_GB.properties 2010-12-08 11:13:06 UTC (rev 292)
@@ -19,3 +19,5 @@
nuitonmatrix.menu.csv.import.file=Import from file
nuitonmatrix.menu.csv.import.position=Import at current position
nuitonmatrix.menu.option.semantics=Export/Copy with semantics
+nuitonmatrix.viewer.renderer.data=Data
+nuitonmatrix.viewer.sum=Sum
Modified: trunk/src/main/resources/i18n/nuiton-matrix_fr_FR.properties
===================================================================
--- trunk/src/main/resources/i18n/nuiton-matrix_fr_FR.properties 2010-12-07 09:17:30 UTC (rev 291)
+++ trunk/src/main/resources/i18n/nuiton-matrix_fr_FR.properties 2010-12-08 11:13:06 UTC (rev 292)
@@ -19,3 +19,5 @@
nuitonmatrix.menu.csv.import.file=Importer depuis un fichier
nuitonmatrix.menu.csv.import.position=Importer \u00E0 la position courante
nuitonmatrix.menu.option.semantics=Exporter/Copier avec la s\u00E9mantique
+nuitonmatrix.viewer.renderer.data=Donn\u00E9es
+nuitonmatrix.viewer.sum=Somme
Added: trunk/src/main/resources/icons/1rightarrow.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/resources/icons/1rightarrow.png
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/resources/icons/sigma-barre.gif
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/resources/icons/sigma-barre.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/resources/icons/sigma.gif
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/resources/icons/sigma.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/resources/icons/table.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/resources/icons/table.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/test/java/org/nuiton/math/matrix/viewer/MatrixViewerPanelTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/math/matrix/viewer/MatrixViewerPanelTest.java (rev 0)
+++ trunk/src/test/java/org/nuiton/math/matrix/viewer/MatrixViewerPanelTest.java 2010-12-08 11:13:06 UTC (rev 292)
@@ -0,0 +1,93 @@
+/*
+ * #%L
+ *
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * %%
+ * 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 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 Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+package org.nuiton.math.matrix.viewer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.swing.JFrame;
+
+import org.junit.Test;
+import org.nuiton.math.matrix.MatrixFactory;
+import org.nuiton.math.matrix.MatrixHelper;
+import org.nuiton.math.matrix.MatrixND;
+import org.nuiton.math.matrix.viewer.renderer.MatrixInfoTableRenderer;
+
+/**
+ * Test for matrix viewer panel.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class MatrixViewerPanelTest {
+
+ protected MatrixND getTestMatrix() {
+ List<String> years = new ArrayList<String>();
+ years.add("1999");
+ years.add("2000");
+ years.add("2001");
+ years.add("2002");
+ years.add("2003");
+ years.add("2004");
+ years.add("2005");
+
+ List<String> cities = new ArrayList<String>();
+ cities.add("Nantes");
+ cities.add("Paris");
+ cities.add("Lyon");
+ cities.add("Lille");
+ cities.add("Toulouse");
+ cities.add("Marseille");
+
+ MatrixND matrix = MatrixFactory.getInstance().create("test matrix", new List<?>[] { years, cities });
+ matrix.setDimensionNames(new String[] { "Years", "Cities"});
+ MatrixHelper.fill(matrix, 10000.0);
+ matrix.setValue(0, 0, 1000);
+ return matrix;
+ }
+
+ /**
+ * Test d'un affichage simple, par defaut.
+ * @throws InterruptedException
+ */
+ @Test
+ public void testViewerPanel() throws InterruptedException {
+ JFrame frame = new JFrame();
+
+ MatrixViewerPanel panel = new MatrixViewerPanel();
+ MatrixND testMatrix = getTestMatrix();
+ panel.addMatrix(testMatrix, testMatrix);
+ panel.addMatrixRenderer(new MatrixInfoTableRenderer());
+ frame.add(panel);
+
+ frame.pack();
+ frame.setLocationRelativeTo(null);
+ frame.setVisible(true);
+ }
+}
Property changes on: trunk/src/test/java/org/nuiton/math/matrix/viewer/MatrixViewerPanelTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
1
0
Author: echatellier
Date: 2010-12-07 10:17:30 +0100 (Tue, 07 Dec 2010)
New Revision: 291
Url: http://nuiton.org/repositories/revision/nuiton-matrix/291
Log:
Fix license
Modified:
trunk/src/license/THIRD-PARTY.properties
Modified: trunk/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/src/license/THIRD-PARTY.properties 2010-12-07 09:15:35 UTC (rev 290)
+++ trunk/src/license/THIRD-PARTY.properties 2010-12-07 09:17:30 UTC (rev 291)
@@ -1,30 +1,7 @@
-###
-# #%L
-# NuitonMatrix
-#
-# $Id$
-# $HeadURL$
-# %%
-# Copyright (C) 2004 - 2010 CodeLutin
-# %%
-# 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 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 Lesser Public License for more details.
-#
-# You should have received a copy of the GNU General Lesser Public
-# License along with this program. If not, see
-# <http://www.gnu.org/licenses/lgpl-3.0.html>.
-# #L%
-###
# Generated by org.nuiton.license.plugin.AddThirdPartyMojo
#-------------------------------------------------------------------------------
# Already used licenses in project :
+# - BSD License
# - Common Public License Version 1.0
# - Lesser General Public License (LGPL)
# - Lesser General Public License (LGPL) v 3.0
@@ -33,5 +10,5 @@
# Please fill the missing licenses for dependencies :
#
#
-#Mon Jun 28 09:36:57 CEST 2010
-commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
+#Tue Dec 07 10:11:54 CET 2010
+commons-primitives--commons-primitives--1.0--jar=The Apache Software License, Version 2.0
1
0
Author: echatellier
Date: 2010-12-07 10:15:35 +0100 (Tue, 07 Dec 2010)
New Revision: 290
Url: http://nuiton.org/repositories/revision/nuiton-matrix/290
Log:
#1132: Update nuiton-i18n 2.0
Added:
trunk/src/main/resources/i18n/nuiton-matrix_en_GB.properties
trunk/src/main/resources/i18n/nuiton-matrix_fr_FR.properties
Removed:
trunk/src/main/resources/i18n/nuiton-matrix-en_GB.properties
trunk/src/main/resources/i18n/nuiton-matrix-fr_FR.properties
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-11-25 09:20:22 UTC (rev 289)
+++ trunk/pom.xml 2010-12-07 09:15:35 UTC (rev 290)
@@ -108,7 +108,7 @@
<jaxxVersion>2.2.3</jaxxVersion>
<nuitonUtilsVersion>1.5</nuitonUtilsVersion>
- <nuitonI18nVersion>1.2.2</nuitonI18nVersion>
+ <nuitonI18nVersion>2.0</nuitonI18nVersion>
<!-- extra files to include in release -->
<redmine.releaseFiles>${redmine.libReleaseFiles}</redmine.releaseFiles>
Deleted: trunk/src/main/resources/i18n/nuiton-matrix-en_GB.properties
===================================================================
--- trunk/src/main/resources/i18n/nuiton-matrix-en_GB.properties 2010-11-25 09:20:22 UTC (rev 289)
+++ trunk/src/main/resources/i18n/nuiton-matrix-en_GB.properties 2010-12-07 09:15:35 UTC (rev 290)
@@ -1,21 +0,0 @@
-nuitonmatrix.create.matrix.button=New matrix
-nuitonmatrix.create.matrix.message=Matrix size (separate by ';')
-nuitonmatrix.create.matrix.title=New matrix
-nuitonmatrix.error=Error
-nuitonmatrix.error.clipboard.read=Cannot read clipboard
-nuitonmatrix.error.clipboard.write=Cannot write clipboard
-nuitonmatrix.error.file.read=Cannot read file
-nuitonmatrix.error.file.write=Cannot write file
-nuitonmatrix.invalid.element=Invalid element %s in matrix %s
-nuitonmatrix.invalid.size=Invalid size\: 0 <\= %d <\= %d
-nuitonmatrix.menu.action=Copy/Paste
-nuitonmatrix.menu.action.copy=Copy
-nuitonmatrix.menu.action.copy.selection=Copy selection
-nuitonmatrix.menu.action.paste=Paste
-nuitonmatrix.menu.action.paste.position=Paste at current position
-nuitonmatrix.menu.csv=Import/Export file CSV
-nuitonmatrix.menu.csv.export.file=Export to file
-nuitonmatrix.menu.csv.export.selection=Export selection
-nuitonmatrix.menu.csv.import.file=Import from file
-nuitonmatrix.menu.csv.import.position=Import at current position
-nuitonmatrix.menu.option.semantics=Export/Copy with semantics
Deleted: trunk/src/main/resources/i18n/nuiton-matrix-fr_FR.properties
===================================================================
--- trunk/src/main/resources/i18n/nuiton-matrix-fr_FR.properties 2010-11-25 09:20:22 UTC (rev 289)
+++ trunk/src/main/resources/i18n/nuiton-matrix-fr_FR.properties 2010-12-07 09:15:35 UTC (rev 290)
@@ -1,21 +0,0 @@
-nuitonmatrix.create.matrix.button=Cr\u00E9er une matrice
-nuitonmatrix.create.matrix.message=Dimensions de la matrice (s\u00E9par\u00E9es par ';')
-nuitonmatrix.create.matrix.title=Cr\u00E9er une matrice
-nuitonmatrix.error=Erreur
-nuitonmatrix.error.clipboard.read=Donn\u00E9e corrompu dans le bloc note
-nuitonmatrix.error.clipboard.write=Impossible d'\u00E9crire dans le bloc note
-nuitonmatrix.error.file.read=Impossible de lire le fichier
-nuitonmatrix.error.file.write=Impossible d'\u00E9crire dans le fichier
-nuitonmatrix.invalid.element=L'\u00E9l\u00E9ment demand\u00E9 %s n'existe pas dans la matrice %s
-nuitonmatrix.invalid.size=La dimension demand\u00E9e n'est pas correcte\: 0 <\= %d <\= %d
-nuitonmatrix.menu.action=Copier/Coller
-nuitonmatrix.menu.action.copy=Copier
-nuitonmatrix.menu.action.copy.selection=Copier la s\u00E9lection
-nuitonmatrix.menu.action.paste=Coller
-nuitonmatrix.menu.action.paste.position=Coller \u00E0 la position courante
-nuitonmatrix.menu.csv=Importer/Exporter fichier CSV
-nuitonmatrix.menu.csv.export.file=Exporter dans un fichier
-nuitonmatrix.menu.csv.export.selection=Exporter la s\u00E9lection
-nuitonmatrix.menu.csv.import.file=Importer depuis un fichier
-nuitonmatrix.menu.csv.import.position=Importer \u00E0 la position courante
-nuitonmatrix.menu.option.semantics=Exporter/Copier avec la s\u00E9mantique
Copied: trunk/src/main/resources/i18n/nuiton-matrix_en_GB.properties (from rev 288, trunk/src/main/resources/i18n/nuiton-matrix-en_GB.properties)
===================================================================
--- trunk/src/main/resources/i18n/nuiton-matrix_en_GB.properties (rev 0)
+++ trunk/src/main/resources/i18n/nuiton-matrix_en_GB.properties 2010-12-07 09:15:35 UTC (rev 290)
@@ -0,0 +1,21 @@
+nuitonmatrix.create.matrix.button=New matrix
+nuitonmatrix.create.matrix.message=Matrix size (separate by ';')
+nuitonmatrix.create.matrix.title=New matrix
+nuitonmatrix.error=Error
+nuitonmatrix.error.clipboard.read=Cannot read clipboard
+nuitonmatrix.error.clipboard.write=Cannot write clipboard
+nuitonmatrix.error.file.read=Cannot read file
+nuitonmatrix.error.file.write=Cannot write file
+nuitonmatrix.invalid.element=Invalid element %s in matrix %s
+nuitonmatrix.invalid.size=Invalid size\: 0 <\= %d <\= %d
+nuitonmatrix.menu.action=Copy/Paste
+nuitonmatrix.menu.action.copy=Copy
+nuitonmatrix.menu.action.copy.selection=Copy selection
+nuitonmatrix.menu.action.paste=Paste
+nuitonmatrix.menu.action.paste.position=Paste at current position
+nuitonmatrix.menu.csv=Import/Export file CSV
+nuitonmatrix.menu.csv.export.file=Export to file
+nuitonmatrix.menu.csv.export.selection=Export selection
+nuitonmatrix.menu.csv.import.file=Import from file
+nuitonmatrix.menu.csv.import.position=Import at current position
+nuitonmatrix.menu.option.semantics=Export/Copy with semantics
Copied: trunk/src/main/resources/i18n/nuiton-matrix_fr_FR.properties (from rev 288, trunk/src/main/resources/i18n/nuiton-matrix-fr_FR.properties)
===================================================================
--- trunk/src/main/resources/i18n/nuiton-matrix_fr_FR.properties (rev 0)
+++ trunk/src/main/resources/i18n/nuiton-matrix_fr_FR.properties 2010-12-07 09:15:35 UTC (rev 290)
@@ -0,0 +1,21 @@
+nuitonmatrix.create.matrix.button=Cr\u00E9er une matrice
+nuitonmatrix.create.matrix.message=Dimensions de la matrice (s\u00E9par\u00E9es par ';')
+nuitonmatrix.create.matrix.title=Cr\u00E9er une matrice
+nuitonmatrix.error=Erreur
+nuitonmatrix.error.clipboard.read=Donn\u00E9e corrompu dans le bloc note
+nuitonmatrix.error.clipboard.write=Impossible d'\u00E9crire dans le bloc note
+nuitonmatrix.error.file.read=Impossible de lire le fichier
+nuitonmatrix.error.file.write=Impossible d'\u00E9crire dans le fichier
+nuitonmatrix.invalid.element=L'\u00E9l\u00E9ment demand\u00E9 %s n'existe pas dans la matrice %s
+nuitonmatrix.invalid.size=La dimension demand\u00E9e n'est pas correcte\: 0 <\= %d <\= %d
+nuitonmatrix.menu.action=Copier/Coller
+nuitonmatrix.menu.action.copy=Copier
+nuitonmatrix.menu.action.copy.selection=Copier la s\u00E9lection
+nuitonmatrix.menu.action.paste=Coller
+nuitonmatrix.menu.action.paste.position=Coller \u00E0 la position courante
+nuitonmatrix.menu.csv=Importer/Exporter fichier CSV
+nuitonmatrix.menu.csv.export.file=Exporter dans un fichier
+nuitonmatrix.menu.csv.export.selection=Exporter la s\u00E9lection
+nuitonmatrix.menu.csv.import.file=Importer depuis un fichier
+nuitonmatrix.menu.csv.import.position=Importer \u00E0 la position courante
+nuitonmatrix.menu.option.semantics=Exporter/Copier avec la s\u00E9mantique
1
0
r289 - in trunk/src: main/java/org/nuiton/math/matrix test/java/org/nuiton/math/matrix
by echatellier@users.nuiton.org 25 Nov '10
by echatellier@users.nuiton.org 25 Nov '10
25 Nov '10
Author: echatellier
Date: 2010-11-25 10:20:22 +0100 (Thu, 25 Nov 2010)
New Revision: 289
Url: http://nuiton.org/repositories/revision/nuiton-matrix/289
Log:
#1093 : Add new function to reduce matrix with mean over dimension
Modified:
trunk/src/main/java/org/nuiton/math/matrix/AbstractMatrixND.java
trunk/src/main/java/org/nuiton/math/matrix/MatrixND.java
trunk/src/test/java/org/nuiton/math/matrix/MatrixNDTest.java
Modified: trunk/src/main/java/org/nuiton/math/matrix/AbstractMatrixND.java
===================================================================
--- trunk/src/main/java/org/nuiton/math/matrix/AbstractMatrixND.java 2010-11-21 14:30:41 UTC (rev 288)
+++ trunk/src/main/java/org/nuiton/math/matrix/AbstractMatrixND.java 2010-11-25 09:20:22 UTC (rev 289)
@@ -666,8 +666,56 @@
return result;
}
+
+ @Override
+ public double meanAll() {
+ double sum = 0;
+ double number = 0;
+ for (MatrixIterator i = iterator(); i.next();) {
+ sum += i.getValue();
+ number++;
+ }
+ double result = sum / number;
+ return result;
+ }
@Override
+ public MatrixND meanOverDim(int dim) {
+ return meanOverDim(dim, getDim(dim));
+ }
+
+ @Override
+ public MatrixND meanOverDim(int dim, int step) {
+ if (step < 0) {
+ step = getDim(dim);
+ } else if (step <= 1) {
+ // il n'y a rien a faire, on fait une copie et on la retrourne
+ return getFactory().create(this);
+ }
+
+ // le nombre d'element qu'il y aura dans la dim pour le resultat
+ int nbDim = getDim(dim) / step;
+
+ List<?>[] semantics = new List<?>[getDimCount()];
+ System.arraycopy(getSemantics(), 0, semantics, 0, getDimCount());
+ semantics[dim] = semantics[dim].subList(0, nbDim);
+
+ // creation du resultat
+ MatrixND result = getFactory().create(getName(), semantics,
+ getDimensionNames());
+
+ for (int i = 0; i < result.getDim(dim); i++) {
+ MatrixND temp = getSubMatrix(dim, i * step, step);
+ MatrixND sum = result.getSubMatrix(dim, i, 1);
+ for (int s = 0; s < temp.getDim(dim); s++) {
+ sum.add(temp.getSubMatrix(dim, s, 1));
+ }
+ sum.divs(temp.getDim(dim)); // mean specifics
+ }
+ return result;
+ }
+
+ @Override
public MatrixND cut(int dim, int[] toCut) {
throw new UnsupportedOperationException("Méthode non implantée");
}
Modified: trunk/src/main/java/org/nuiton/math/matrix/MatrixND.java
===================================================================
--- trunk/src/main/java/org/nuiton/math/matrix/MatrixND.java 2010-11-21 14:30:41 UTC (rev 288)
+++ trunk/src/main/java/org/nuiton/math/matrix/MatrixND.java 2010-11-25 09:20:22 UTC (rev 289)
@@ -440,8 +440,78 @@
public MatrixND sumOverDim(int dim, int step);
public MatrixND sumOverDim(int dim, int start, int nb);
+
+ /**
+ * Return all matrix data mean value
+ *
+ * @return mean value
+ */
+ public double meanAll();
/**
+ * Effectue la moyenne des valeurs sur une dimension donnée. La matrice
+ * résultat à le même nombre de dimension, pas la dimension moyenisée, ne
+ * contient qu'une ligne.
+ * <p>
+ * par exemple pour la matrice suivante si on fait la moyenne sur la
+ * dimension 1 cela donnera
+ *
+ * <pre>
+ * 1 2 3
+ * 8 9 4
+ * 7 6 5
+ * </pre>
+ *
+ * <pre>
+ * 5.33 4.66 4
+ * </pre>
+ *
+ * @param dim la dimension sur lequel il faut faire la moyenne
+ * @return new matrix
+ */
+ public MatrixND meanOverDim(int dim);
+
+ /**
+ * Effectue la moyenne des valeurs sur une dimension donnée. la moyenne
+ * permet juste de regrouper dans une dimension un certain nombre de valeur.
+ * <p>
+ * pour la matrice suivante :
+ *
+ * <pre>
+ * 1 2 3 4
+ * 2 3 4 5
+ * 3 4 5 6
+ * 4 5 6 7
+ * </pre>
+ *
+ * la moyenne sur la dimension 1 avec un pas de 2 donnera :
+ *
+ * <pre>
+ * 1.5 3.5 4.5 4.5
+ * 4.5 4.5 5.5 6.5
+ * </pre>
+ *
+ * c'est à dire que sur la ligne 0 et la ligne 1 on fait la moyenne. ainsi
+ * que la ligne 2 avec la ligne 3.
+ *
+ * @param dim la dimension sur lequel il faut faire les sommes
+ * @param step le pas qu'il faut utiliser pour regrouper les elements. Si le
+ * pas est inférieur à 0, le pas se comporte comme si on avait
+ * passé en argument la taille de la dimension. Un pas de 0 ou 1,
+ * retourne juste une copie de la matrice actuelle. si la
+ * division du pas avec la taille de la dimension ne donne pas un
+ * nombre entier, les elements restants ne sont pas pris en
+ * compte. Par exemple si la dimension a 10 élements et que l'on
+ * donne un pas de 3, dans la matrice resultat la dimension aura
+ * 3 elements qui seront la somme par 3 des 9 premiers element de
+ * la matrice courante. Le 10eme element sera perdu.
+ * @return une nouvelle matrice avec le meme nombre de dimension mais dont
+ * la dimension passé en paramètre aura comme taille, le resultat de
+ * la division entier de la taille actuelle par le step
+ */
+ public MatrixND meanOverDim(int dim, int step);
+
+ /**
* Permet de supprimer des éléments de la matrice.
* Par exemple, pour la matrice
*
@@ -592,7 +662,7 @@
public MatrixND getSubMatrix(int dim, int[] elem);
/**
- * Addition la matrice courante avec la matrice passe en parametre et ce
+ * Addition la matrice courante avec la matrice passe en parametre et se
* retourne elle meme.
*
* @param m matrix to add
Modified: trunk/src/test/java/org/nuiton/math/matrix/MatrixNDTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/math/matrix/MatrixNDTest.java 2010-11-21 14:30:41 UTC (rev 288)
+++ trunk/src/test/java/org/nuiton/math/matrix/MatrixNDTest.java 2010-11-25 09:20:22 UTC (rev 289)
@@ -322,7 +322,114 @@
Assert.assertEquals(9, mat.getValue(5, 0, 3), 0);
}
+ /**
+ * Test les fonctions meanOverDim...
+ *
+ * La matrice de test est
+ * 1 2 3 4
+ * 5 6 7 8
+ * 9 10 11 12
+ * 13 14 15 16
+ * @throws Exception
+ */
@Test
+ public void testMeanOverDim() throws Exception {
+
+ // first test matrix :
+ // 1 2 3 4
+ // 5 6 7 8
+ // 9 10 11 12
+ // 13 14 15 16
+
+ MatrixND mat = null;
+ mat = getFactory().create(new int[] { 4, 4 });
+ MatrixND mat2 = mat;
+ int i = 0;
+ for (MatrixIterator mi = mat.iterator(); mi.next();) {
+ mi.setValue(++i);
+ }
+
+ Assert.assertEquals(mat, mat2);
+ mat2 = mat.meanOverDim(1, 0);
+ Assert.assertEquals(mat, mat2);
+ mat2 = mat.meanOverDim(1, 1);
+ Assert.assertEquals(mat, mat2);
+ mat2 = mat.meanOverDim(1, 2);
+ Assert.assertEquals(2, mat2.getDim(1));
+ Assert.assertEquals(1.5, mat2.getValue(0, 0), 0);
+ Assert.assertEquals(3.5, mat2.getValue(0, 1), 0);
+ Assert.assertEquals(5.5, mat2.getValue(1, 0), 0);
+ Assert.assertEquals(7.5, mat2.getValue(1, 1), 0);
+ Assert.assertEquals(9.5, mat2.getValue(2, 0), 0);
+ Assert.assertEquals(11.5, mat2.getValue(2, 1), 0);
+ Assert.assertEquals(13.5, mat2.getValue(3, 0), 0);
+ Assert.assertEquals(15.5, mat2.getValue(3, 1), 0);
+
+ mat2 = mat.meanOverDim(1, 3);
+ Assert.assertEquals(1, mat2.getDim(1));
+ Assert.assertEquals(2.0, mat2.getValue(0, 0), 0);
+ Assert.assertEquals(6.0, mat2.getValue(1, 0), 0);
+ Assert.assertEquals(10.0, mat2.getValue(2, 0), 0);
+ Assert.assertEquals(14.0, mat2.getValue(3, 0), 0);
+
+ mat2 = mat.meanOverDim(1, 4);
+ Assert.assertEquals(1, mat2.getDim(1));
+ Assert.assertEquals(2.5, mat2.getValue(0, 0), 0);
+ Assert.assertEquals(6.5, mat2.getValue(1, 0), 0);
+ Assert.assertEquals(10.5, mat2.getValue(2, 0), 0);
+ Assert.assertEquals(14.5, mat2.getValue(3, 0), 0);
+
+ // meanAll
+ double meanAll = mat.meanAll();
+ Assert.assertEquals(8.5, meanAll, 0);
+
+ // seconde matrice (en 3 dimension :D)
+ // 2 3 3 3 3 3 3 3 3
+ // 3 3 3 3 3 3 3 3 3
+ // 3 3 3 3 3 3 3 3 4
+ List<String> s1 = Arrays.asList(new String[] { "a", "b", "c" });
+ List<String> s2 = Arrays.asList(new String[] { "e", "f", "g" });
+ List<String> s3 = Arrays.asList(new String[] { "k", "l", "m" });
+ mat = getFactory().create("Ma mat", new List[] { s1, s2, s3 },
+ new String[] { "dim abc", "dim efg", "dim klm" });
+
+ MatrixHelper.fill(mat, 3);
+ mat.setValue(0, 0, 0, 2);
+ mat.setValue(2, 2, 2, 4);
+ mat = mat.meanOverDim(1);
+ // donne :
+ // 2.66 3 3 3 3 3 3 3 3.33
+ Assert.assertTrue(MatrixHelper.sameDimension(new int[] { 3, 1, 3 }, mat
+ .getDim()));
+
+ Assert.assertEquals(2.6666, mat.getValue(0, 0, 0), 0.0001);
+ Assert.assertEquals(3, mat.getValue(2, 0, 1), 0);
+ Assert.assertEquals(3.3333, mat.getValue(2, 0, 2), 0.0001);
+
+ mat = getFactory().create(new int[] { 6, 6, 6 });
+
+ MatrixHelper.fill(mat, 3);
+ mat.setValue(0, 0, 0, 0);
+ mat.setValue(0, 1, 0, 1);
+ mat.setValue(0, 2, 0, 2);
+ mat.setValue(0, 3, 0, 3);
+ mat.setValue(0, 4, 0, 4);
+ mat.setValue(0, 5, 0, 5);
+
+ // meanAll
+ meanAll = mat.meanAll();
+ Assert.assertEquals(2.9861, meanAll, 0.0001);
+
+ mat = mat.meanOverDim(1, 3);
+ Assert.assertTrue(MatrixHelper.sameDimension(new int[] { 6, 2, 6 }, mat
+ .getDim()));
+ Assert.assertEquals(1.0, mat.getValue(0, 0, 0), 0);
+ Assert.assertEquals(4.0, mat.getValue(0, 1, 0), 0);
+ Assert.assertEquals(3.0, mat.getValue(1, 1, 5), 0);
+ Assert.assertEquals(3.0, mat.getValue(5, 0, 3), 0);
+ }
+
+ @Test
public void testTranspose() throws Exception {
MatrixND mat = null;
1
0