Re: [convert] Automatic conversion based on proxies

2013-08-15 Thread Jörg Schaible
Hi, Emmanuel Bourg wrote: Le 14/08/2013 17:39, Adrian Crum a écrit : Instead of int columnInt = record.getValueAsInt(1); the developer would use Integer columnInt = Util.convertTo(record.getValue(1), Integer.class); +1 for the static method, that would allow the use of a static

Re: [convert] Automatic conversion based on proxies

2013-08-15 Thread James Carman
I personally think we're over-thinking this thing. Keep it simple, folks: public interface ConverterF,T { T convert(F from); } You can auto-detect the F/T parameters when a Converter is registered. On Thu, Aug 15, 2013 at 4:42 AM, Jörg Schaible joerg.schai...@scalaris.com wrote: Hi,

Re: [convert] Automatic conversion based on proxies

2013-08-15 Thread Gary Gregory
Should the framework try to convert transitively? Gary On Aug 15, 2013, at 6:56, James Carman ja...@carmanconsulting.com wrote: I personally think we're over-thinking this thing. Keep it simple, folks: public interface ConverterF,T { T convert(F from); } You can auto-detect the F/T

Re: [Math] Fluent API, inheritance and immutability

2013-08-15 Thread Gilles
On Wed, 14 Aug 2013 23:40:58 +0100, sebb wrote: On 14 August 2013 23:34, Gilles gil...@harfang.homelinux.org wrote: At this point, I'd tend to think that creating a copy of trunk in the Commons's sandbox part of the repository will be more productive. Why sandbox? Just use a temporary

Re: [convert] Automatic conversion based on proxies

2013-08-15 Thread James Carman
You mean if it has a converter from A - B and B - C and you ask for a conversion from A - C, it would figure it out? That's and interesting idea. I guess you'd need to make sure there is no loss of fidelity when doing the conversions. On Thu, Aug 15, 2013 at 8:00 AM, Gary Gregory

Re: [Math] Fluent API, inheritance and immutability

2013-08-15 Thread Konstantin Berlin
Hi, As a quick first pass, I will comment on Evans code only for now. Most of my comments have to do with numerical aspects and associated design, rather than threading. I like the idea of the optimize function taking in a Problem class. I think it can add a lot of flexibility going forward.

Re: [convert] Automatic conversion based on proxies

2013-08-15 Thread Gary Gregory
On Thu, Aug 15, 2013 at 9:09 AM, James Carman ja...@carmanconsulting.comwrote: You mean if it has a converter from A - B and B - C and you ask for a conversion from A - C, it would figure it out? That's and interesting idea. I guess you'd need to make sure there is no loss of fidelity when

Re: [convert] Automatic conversion based on proxies

2013-08-15 Thread James Carman
Perhaps you'd have a different method on the registry like this: ConverterF,T createConverterPath(ClassF fromType, ClassT toType); This way, you're specifically letting the registry know that you're okay with it filling in the blanks in between fromType and toType. On Thu, Aug 15, 2013 at 9:24

Re: [Math] Fluent API, inheritance and immutability

2013-08-15 Thread Phil Steitz
On Aug 15, 2013, at 7:31 AM, Gilles gil...@harfang.homelinux.org wrote: On Wed, 14 Aug 2013 23:40:58 +0100, sebb wrote: On 14 August 2013 23:34, Gilles gil...@harfang.homelinux.org wrote: At this point, I'd tend to think that creating a copy of trunk in the Commons's sandbox part of the

Re: [Math] Fluent API, inheritance and immutability

2013-08-15 Thread Gilles
On Thu, 15 Aug 2013 11:07:20 -0500, Phil Steitz wrote: On Aug 15, 2013, at 7:31 AM, Gilles gil...@harfang.homelinux.org wrote: On Wed, 14 Aug 2013 23:40:58 +0100, sebb wrote: On 14 August 2013 23:34, Gilles gil...@harfang.homelinux.org wrote: At this point, I'd tend to think that creating

Default constructors

2013-08-15 Thread Ajo Fod
Sometimes, the simplest constructor for a class requires parameters that there is an obvious default choice for: One such example is:

Re: [convert] Automatic conversion based on proxies

2013-08-15 Thread Oliver Heger
Am 15.08.2013 15:33, schrieb James Carman: Perhaps you'd have a different method on the registry like this: ConverterF,T createConverterPath(ClassF fromType, ClassT toType); This way, you're specifically letting the registry know that you're okay with it filling in the blanks in between

Re: [MATH] Default constructors

2013-08-15 Thread sebb
[Top-posting] Please remember to include the [MATH] prefix in the subject line, as I have done in this reply. On 15 August 2013 20:22, Ajo Fod ajo@gmail.com wrote: Sometimes, the simplest constructor for a class requires parameters that there is an obvious default choice for: One such

Re: [convert] Automatic conversion based on proxies

2013-08-15 Thread James Carman
I'm okay with layers too. You need to open up the API for querying so that upper layers can traverse the graph. On Thursday, August 15, 2013, Oliver Heger wrote: Am 15.08.2013 15:33, schrieb James Carman: Perhaps you'd have a different method on the registry like this: ConverterF,T

[math] Using the hessian in scalar unconstrained optimization

2013-08-15 Thread Ajo Fod
Hello, Is'nt there an advantage to being able to compute the Jacobian of the gradient precisely at a point? If so, is there a class that uses the Jacobian instead of estimating the jacobian from the last few iteration as NonLinearConjugateGradientOptimizer does? Thanks, -Ajo

Re: [math] Using the hessian in scalar unconstrained optimization

2013-08-15 Thread Konstantin Berlin
There would be an advantage, true. I don't know if commons has one (doesn't look like it). You can also try http://www.joptimizer.com/ On Thu, Aug 15, 2013 at 4:59 PM, Ajo Fod ajo@gmail.com wrote: Hello, Is'nt there an advantage to being able to compute the Jacobian of the gradient

Re: [math] Using the hessian in scalar unconstrained optimization

2013-08-15 Thread Ajo Fod
Yes that works. Thanks! On Thursday, August 15, 2013, Konstantin Berlin wrote: There would be an advantage, true. I don't know if commons has one (doesn't look like it). You can also try http://www.joptimizer.com/ On Thu, Aug 15, 2013 at 4:59 PM, Ajo Fod ajo@gmail.com javascript:;