[jira] [Commented] (MATH-733) Add LogNormal distribution
[ https://issues.apache.org/jira/browse/MATH-733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13186742#comment-13186742 ] Dennis Hendriks commented on MATH-733: -- Hi Sébastien, I completely understand your objection to using mean and standardDeviation. I think changing them to scale and shape would indeed be a good idea. Please go ahead with your proposed changes. And thanks for looking at my contribution! > Add LogNormal distribution > -- > > Key: MATH-733 > URL: https://issues.apache.org/jira/browse/MATH-733 > Project: Commons Math > Issue Type: New Feature >Reporter: Dennis Hendriks >Assignee: Sébastien Brisard > Labels: distribution > Fix For: 3.0 > > Attachments: lognormal_distribution.patch > > > It would be nice to have a log-normal distribution. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MATH-733) Add LogNormal distribution
[ https://issues.apache.org/jira/browse/MATH-733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13186732#comment-13186732 ] Sébastien Brisard commented on MATH-733: Hi Dennis, thanks for this contribution. I've looked into it, and am uncomfortable with the naming conventions {{mean}} and {{standardDeviation}} which are *not* the mean and sd of the log-normal distribution, but rather the underlying normal distribution. Would you object to my renaming all these parameters and class variables to {{scale}} and {{shape}}, as you yourself mention these naming conventions in the javadoc? I would then move your explanation of the definition of these parameters to the class's documentation comment. >From the user's perspective (heavily relying on automatic completion) I think >it is dangerous that {{getMean()}} should *not* return the mean value of the >current distribution. Of course, your javadoc comments are very clear, but... >Also, my experience in materials science is that people are always a bit >"fuzzy" about log-normal distributions. What they call "sigma" is never very >clear... Please let me know what you think. > Add LogNormal distribution > -- > > Key: MATH-733 > URL: https://issues.apache.org/jira/browse/MATH-733 > Project: Commons Math > Issue Type: New Feature >Reporter: Dennis Hendriks > Labels: distribution > Fix For: 3.0 > > Attachments: lognormal_distribution.patch > > > It would be nice to have a log-normal distribution. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (SANSELAN-61) More broken links on web site
More broken links on web site - Key: SANSELAN-61 URL: https://issues.apache.org/jira/browse/SANSELAN-61 Project: Commons Sanselan Issue Type: Bug Components: Documentation Affects Versions: 0.97 Environment: Web address: http://commons.apache.org/sanselan/sampleusage.html Reporter: Ralph Louis Vinciguerra Fix For: 0.97 Sample usage source code links lead to non-existent pages. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (SANSELAN-60) broken link on web site
broken link on web site --- Key: SANSELAN-60 URL: https://issues.apache.org/jira/browse/SANSELAN-60 Project: Commons Sanselan Issue Type: Bug Components: Documentation Affects Versions: 0.97 Reporter: Ralph Louis Vinciguerra Fix For: 0.97 On this page: http://commons.apache.org/sanselan/ the "Documentation" link in the left navigation box is broken, and leads to: Not Found The requested URL /SANSELAN/ was not found on this server. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (JEXL-125) Unable to invoke method with ObjectContext
[ https://issues.apache.org/jira/browse/JEXL-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13186602#comment-13186602 ] Maurizio Cucchiara edited comment on JEXL-125 at 1/15/12 10:07 PM: --- I'm not a JEXL guru, but looking at the source code, I guess that the code fragment you provided is not right (see below examples). {code:title=Example 1} public void test() throws Exception { JexlEngine jexl = new JexlEngine(); jexl.setStrict(true); JexlContext jc = new ObjectContext(jexl, new Foo()); Assert.assertEquals("OK", jc.get("method()")); } {code} {code:title=Example 2} @Test public void test() throws Exception { JexlEngine jexl = new JexlEngine(); jexl.setStrict(true); Expression e = jexl.createExpression("method()"); JexlContext jc = new FooContext(jexl, new Foo()); Assert.assertEquals("FOOBAR", e.evaluate(jc)); } static public class FooContext extends ObjectContext { FooContext(JexlEngine jexl, Foo foo) { super(jexl, foo); } public String method() { return "FOOBAR"; } } {code} Just another side note: when you are not sure if you are facing a bug or not, I strongly advise to ask to [the user ML|http://commons.apache.org/jexl/mail-lists.html] HTH was (Author: maurizio.cucchiara): I'm not a JEXL guru, but looking at the source code, I guess that the code fragment you provided is not right (see below examples). {code:title=Example 1} public void test() throws Exception { JexlEngine jexl = new JexlEngine(); jexl.setStrict(true); Expression e = jexl.createExpression("method()"); JexlContext jc = new ObjectContext(jexl, new Foo()); Assert.assertEquals("OK", jc.get("methodA()")); } {code} {code:title=Example 2} @Test public void test() throws Exception { JexlEngine jexl = new JexlEngine(); jexl.setStrict(true); Expression e = jexl.createExpression("method()"); JexlContext jc = new FooContext(jexl, new Foo()); Assert.assertEquals("FOOBAR", e.evaluate(jc)); } static public class FooContext extends ObjectContext { FooContext(JexlEngine jexl, Foo foo) { super(jexl, foo); } public String method() { return "FOOBAR"; } } {code} Just another side note: when you are not sure if you are facing a bug or not, I strongly advise to ask to [the user ML|http://commons.apache.org/jexl/mail-lists.html] HTH > Unable to invoke method with ObjectContext > -- > > Key: JEXL-125 > URL: https://issues.apache.org/jira/browse/JEXL-125 > Project: Commons JEXL > Issue Type: Bug >Affects Versions: 2.1.1 > Environment: Java 1.6.0_20 on Windows 7 >Reporter: Matteo Trotta > > Hi, I'm trying to invoke a method on Object context but I can't get it to > work. > I don't know if it's a bug or I'm doing it wrong. > Here it is the code I'm using: > {code:title=JexlTest.java} > package it.test; > import org.apache.commons.jexl2.Expression; > import org.apache.commons.jexl2.JexlContext; > import org.apache.commons.jexl2.JexlEngine; > import org.apache.commons.jexl2.ObjectContext; > import org.junit.Test; > public class JexlTest { > public static class Foo { > public String method() { > return "OK"; > } > } > @Test > public void test() throws Exception { > JexlEngine jexl = new JexlEngine(); > jexl.setStrict(true); > Expression e = jexl.createExpression("method()"); > JexlContext jc = new ObjectContext(jexl, new Foo()); > System.out.println(e.evaluate(jc)); > } > } > {code} > Here is the exception I'm getting: > {noformat} > org.apache.commons.jexl2.JexlException: it.test.JexlTest.test@19![0,8]: > 'method();' method error > at org.apache.commons.jexl2.Interpreter.call(Interpreter.java:1078) > at org.apache.commons.jexl2.Interpreter.visit(Interpreter.java:1100) > at > org.apache.commons.jexl2.parser.ASTMethodNode.jjtAccept(ASTMethodNode.java:18) > at org.apache.commons.jexl2.Interpreter.visit(Interpreter.java:1317) > at > org.apache.commons.jexl2.parser.ASTReference.jjtAccept(ASTReference.java:18) > at org.apache.commons.jexl2.Interpreter.interpret(Interpreter.java:232) > at > org.apache.commons.jexl2.ExpressionImpl.evaluate(ExpressionImpl.java:65) > at it.test.JexlTest.test(JexlTest.java:21) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(
[jira] [Commented] (JEXL-125) Unable to invoke method with ObjectContext
[ https://issues.apache.org/jira/browse/JEXL-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13186602#comment-13186602 ] Maurizio Cucchiara commented on JEXL-125: - I'm not a JEXL guru, but looking at the source code, I guess that the code fragment you provided is not right (see below examples). {code:title=Example 1} public void test() throws Exception { JexlEngine jexl = new JexlEngine(); jexl.setStrict(true); Expression e = jexl.createExpression("method()"); JexlContext jc = new ObjectContext(jexl, new Foo()); Assert.assertEquals("OK", jc.get("methodA()")); } {code} {code:title=Example 2} @Test public void test() throws Exception { JexlEngine jexl = new JexlEngine(); jexl.setStrict(true); Expression e = jexl.createExpression("method()"); JexlContext jc = new FooContext(jexl, new Foo()); Assert.assertEquals("FOOBAR", e.evaluate(jc)); } static public class FooContext extends ObjectContext { FooContext(JexlEngine jexl, Foo foo) { super(jexl, foo); } public String method() { return "FOOBAR"; } } {code} Just another side note: when you are not sure if you are facing a bug or not, I strongly advise to ask to [the user ML|http://commons.apache.org/jexl/mail-lists.html] HTH > Unable to invoke method with ObjectContext > -- > > Key: JEXL-125 > URL: https://issues.apache.org/jira/browse/JEXL-125 > Project: Commons JEXL > Issue Type: Bug >Affects Versions: 2.1.1 > Environment: Java 1.6.0_20 on Windows 7 >Reporter: Matteo Trotta > > Hi, I'm trying to invoke a method on Object context but I can't get it to > work. > I don't know if it's a bug or I'm doing it wrong. > Here it is the code I'm using: > {code:title=JexlTest.java} > package it.test; > import org.apache.commons.jexl2.Expression; > import org.apache.commons.jexl2.JexlContext; > import org.apache.commons.jexl2.JexlEngine; > import org.apache.commons.jexl2.ObjectContext; > import org.junit.Test; > public class JexlTest { > public static class Foo { > public String method() { > return "OK"; > } > } > @Test > public void test() throws Exception { > JexlEngine jexl = new JexlEngine(); > jexl.setStrict(true); > Expression e = jexl.createExpression("method()"); > JexlContext jc = new ObjectContext(jexl, new Foo()); > System.out.println(e.evaluate(jc)); > } > } > {code} > Here is the exception I'm getting: > {noformat} > org.apache.commons.jexl2.JexlException: it.test.JexlTest.test@19![0,8]: > 'method();' method error > at org.apache.commons.jexl2.Interpreter.call(Interpreter.java:1078) > at org.apache.commons.jexl2.Interpreter.visit(Interpreter.java:1100) > at > org.apache.commons.jexl2.parser.ASTMethodNode.jjtAccept(ASTMethodNode.java:18) > at org.apache.commons.jexl2.Interpreter.visit(Interpreter.java:1317) > at > org.apache.commons.jexl2.parser.ASTReference.jjtAccept(ASTReference.java:18) > at org.apache.commons.jexl2.Interpreter.interpret(Interpreter.java:232) > at > org.apache.commons.jexl2.ExpressionImpl.evaluate(ExpressionImpl.java:65) > at it.test.JexlTest.test(JexlTest.java:21) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) > at > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) > at > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) > at > org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:274) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:48) > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:242) > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:58) > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:240) > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:48) > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:233) > at org.junit.runners.ParentRunner.run(ParentRunner.java:303) > at org.junit.runner.JUnitCore.run(JUnitCore.java:157) > at > com.intellij.junit4.JUnit4IdeaTestRunn
[jira] [Resolved] (CONFIGURATION-476) Possible ClassCastException in CompositeConfiguration if a special in-memory configuration is used
[ https://issues.apache.org/jira/browse/CONFIGURATION-476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oliver Heger resolved CONFIGURATION-476. Resolution: Fixed Fix Version/s: 1.8 Fixed in revision 1231760. > Possible ClassCastException in CompositeConfiguration if a special in-memory > configuration is used > -- > > Key: CONFIGURATION-476 > URL: https://issues.apache.org/jira/browse/CONFIGURATION-476 > Project: Commons Configuration > Issue Type: Bug >Affects Versions: 1.7 >Reporter: Oliver Heger >Assignee: Oliver Heger > Fix For: 1.8 > > > Some methods of {{CompositeConfiguration}} expect that the in-memory > configuration is of type {{BaseConfiguration}} (a configuration of this type > is created if no specific in-memory configuration was provided). > However, there are constructors accepting an arbitrary {{Configuration}} > object as in-memory configuration. If here a configuration is specified which > does not extend {{BaseConfiguration}}, the casts performed by these methods > will fail. The casts should only be performed if possible. > The following methods are affected: > * _setListDelimiter()_ > * _setDelimiterParsingDisabled()_ -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CONFIGURATION-476) Possible ClassCastException in CompositeConfiguration if a special in-memory configuration is used
Possible ClassCastException in CompositeConfiguration if a special in-memory configuration is used -- Key: CONFIGURATION-476 URL: https://issues.apache.org/jira/browse/CONFIGURATION-476 Project: Commons Configuration Issue Type: Bug Affects Versions: 1.7 Reporter: Oliver Heger Assignee: Oliver Heger Some methods of {{CompositeConfiguration}} expect that the in-memory configuration is of type {{BaseConfiguration}} (a configuration of this type is created if no specific in-memory configuration was provided). However, there are constructors accepting an arbitrary {{Configuration}} object as in-memory configuration. If here a configuration is specified which does not extend {{BaseConfiguration}}, the casts performed by these methods will fail. The casts should only be performed if possible. The following methods are affected: * _setListDelimiter()_ * _setDelimiterParsingDisabled()_ -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CONFIGURATION-475) Deprecate ConfigurationKey class
[ https://issues.apache.org/jira/browse/CONFIGURATION-475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oliver Heger resolved CONFIGURATION-475. Resolution: Fixed Fix Version/s: 1.8 Fixed in revision 1231749. > Deprecate ConfigurationKey class > > > Key: CONFIGURATION-475 > URL: https://issues.apache.org/jira/browse/CONFIGURATION-475 > Project: Commons Configuration > Issue Type: Improvement >Affects Versions: 1.7 >Reporter: Oliver Heger >Assignee: Oliver Heger >Priority: Minor > Fix For: 1.8 > > > The classes {{ConfigurationKey}} and {{DefaultConfigurationKey}} (from the > _tree_ package) are almost identical. The major difference is that > {{DefaultConfigurationKey}} is associated with a {{DefaultExpressionEngine}} > instance and thus can produce correct keys even if the separator characters > have been changed. There is little point in keeping both, so > {{ConfigurationKey}} should be deprecated. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (JEXL-125) Unable to invoke method with ObjectContext
Unable to invoke method with ObjectContext -- Key: JEXL-125 URL: https://issues.apache.org/jira/browse/JEXL-125 Project: Commons JEXL Issue Type: Bug Affects Versions: 2.1.1 Environment: Java 1.6.0_20 on Windows 7 Reporter: Matteo Trotta Hi, I'm trying to invoke a method on Object context but I can't get it to work. I don't know if it's a bug or I'm doing it wrong. Here it is the code I'm using: {code:title=JexlTest.java} package it.test; import org.apache.commons.jexl2.Expression; import org.apache.commons.jexl2.JexlContext; import org.apache.commons.jexl2.JexlEngine; import org.apache.commons.jexl2.ObjectContext; import org.junit.Test; public class JexlTest { public static class Foo { public String method() { return "OK"; } } @Test public void test() throws Exception { JexlEngine jexl = new JexlEngine(); jexl.setStrict(true); Expression e = jexl.createExpression("method()"); JexlContext jc = new ObjectContext(jexl, new Foo()); System.out.println(e.evaluate(jc)); } } {code} Here is the exception I'm getting: {noformat} org.apache.commons.jexl2.JexlException: it.test.JexlTest.test@19![0,8]: 'method();' method error at org.apache.commons.jexl2.Interpreter.call(Interpreter.java:1078) at org.apache.commons.jexl2.Interpreter.visit(Interpreter.java:1100) at org.apache.commons.jexl2.parser.ASTMethodNode.jjtAccept(ASTMethodNode.java:18) at org.apache.commons.jexl2.Interpreter.visit(Interpreter.java:1317) at org.apache.commons.jexl2.parser.ASTReference.jjtAccept(ASTReference.java:18) at org.apache.commons.jexl2.Interpreter.interpret(Interpreter.java:232) at org.apache.commons.jexl2.ExpressionImpl.evaluate(ExpressionImpl.java:65) at it.test.JexlTest.test(JexlTest.java:21) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:274) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:48) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:242) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:58) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:240) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:48) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:233) at org.junit.runners.ParentRunner.run(ParentRunner.java:303) at org.junit.runner.JUnitCore.run(JUnitCore.java:157) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:71) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:202) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) Caused by: org.apache.commons.jexl2.JexlException$Property: org.apache.commons.jexl2.ObjectContext.get@42![0,9]: '#0.method;' inaccessible or unknown property #0 at org.apache.commons.jexl2.Interpreter.visit(Interpreter.java:1341) at org.apache.commons.jexl2.parser.ASTReference.jjtAccept(ASTReference.java:18) at org.apache.commons.jexl2.JexlEngine.getProperty(JexlEngine.java:615) at org.apache.commons.jexl2.JexlEngine.getProperty(JexlEngine.java:587) at org.apache.commons.jexl2.ObjectContext.get(ObjectContext.java:42) at org.apache.commons.jexl2.Interpreter.call(Interpreter.java:1047) {noformat} Using a MapContext with variable "foo" set to 'new Foo()' and the expression "foo.method()" gives no error. Anyway for my use it's more practical a ObjectContext, as I have only one object in the context. Thank you for very much and keep up the excellent work! Matteo Trotta -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.a
[jira] [Created] (CONFIGURATION-475) Deprecate ConfigurationKey class
Deprecate ConfigurationKey class Key: CONFIGURATION-475 URL: https://issues.apache.org/jira/browse/CONFIGURATION-475 Project: Commons Configuration Issue Type: Improvement Affects Versions: 1.7 Reporter: Oliver Heger Priority: Minor The classes {{ConfigurationKey}} and {{DefaultConfigurationKey}} (from the _tree_ package) are almost identical. The major difference is that {{DefaultConfigurationKey}} is associated with a {{DefaultExpressionEngine}} instance and thus can produce correct keys even if the separator characters have been changed. There is little point in keeping both, so {{ConfigurationKey}} should be deprecated. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira