Re: [math] IIR filter library (Butterworth,Bessel,...)

2016-10-25 Thread Arne Ploese
Finite_impulse_response > it takes one sample in and spits one out by using a delay line. > Usually > implemented as a ring buffer. In C that can be done very elegantly > with > pointer gymnastics: > https://github.com/berndporr/fir1 > Arne, do you have an efficient way of d

Re: [math] IIR filter library (Butterworth,Bessel,...)

2016-10-24 Thread Arne Ploese
Am Samstag, den 22.10.2016, 23:25 +0100 schrieb Bernd Porr: (...) > I'm not too crazy about proper FIR filters in JAVA because even in > C++  > they are just too slow and one would need to write them as JNI calls > to  > C to make them run fast enough (for example a 50Hz notch for ECG at > 1kHz 

Re: [math] RealVector with visibility protected|public conflict

2013-04-11 Thread Arne Ploese
Am Donnerstag, den 11.04.2013, 16:08 +0200 schrieb Gilles: > Hello. > > > > > in class org.apache.commons.math3.linear.RealVector there is the > > embedded class Entry which is protected, but it is exposed by method > > public Iterator iterator() ... > > Good catch. Thanks. > > > > > My solution

[math] RealVector with visibility protected|public conflict

2013-04-09 Thread Arne Ploese
Hi, in class org.apache.commons.math3.linear.RealVector there is the embedded class Entry which is protected, but it is exposed by method public Iterator iterator() ... My solution: 1. make class Entry public 2. make class RealVector implement Iterable> so one can do this: for (RealVector.Entr

Re: [math] RealVector.toArray() vs. RealVector.getData()

2011-09-07 Thread Arne Ploese
I would introduce getArrayRef(), which makes clear what exactly happen. It is after all the same like spares/dense discussion ... Arne Am Mittwoch, den 07.09.2011, 08:11 +0200 schrieb Sébastien Brisard: > In fact, getArrayRef does not belong to the RealVector class. It is > only defined in Array

Re: [math] RealVector.toArray() vs. RealVector.getData()

2011-09-06 Thread Arne Ploese
If toArray() returns always a copy and if getArrayRef() throws an exception if there is no backing array, it would be much clearer. A property isArray() is needed in this case. Arne Am Mittwoch, den 07.09.2011, 04:19 +0200 schrieb Sébastien Brisard: > Hi, > as noted in MATH-653, these two method

Re: [math] Complex division WASRe [jira] [Commented] (MATH-657) Division by zero

2011-09-06 Thread Arne Ploese
I added the file ComplexOctaveTest.java to JIRA MATH-620. What really will happen, if Inf and NaN values com up I dont know at this point - the complex signal path is in its infancy at the moment ... (I currently have no need for that) Arne --

Re: [math] Complex division WASRe [jira] [Commented] (MATH-657) Division by zero

2011-09-05 Thread Arne Ploese
e shift, the tan will be +infinity or -infinity... If you math guys tell me that there is really no difference with complex numbers - I can live with it (Even if I dont understand why ;-)). Am Montag, den 05.09.2011, 12:45 +0200 schrieb Arne Ploese: > Sorry answering that late, but I was busy... >

Re: [math] Complex division WASRe [jira] [Commented] (MATH-657) Division by zero

2011-09-05 Thread Arne Ploese
Sorry answering that late, but I was busy... So simply I try to write a lib that doing some DSP stuff. I took some *.m files from the octave signaling package ant converted them to java (digital filters aka. Butterworth ...) there is a litte bit calculation needed. So my problem is: if the com

Re: [Math] "iterator" and "sparseIterator" in "RealVector" hierarchy

2011-08-18 Thread Arne Ploese
I could think of the following extension to RealVector: boolean isSparse(); void setSparse(boolean sparse); double calcSparse(double sparseThresholdInPercent); Explanation: Default value from isSparse on ArrayRealvector is false and on OpenMapRealvector is true (set in constructor). setSp

Re: [Math] "iterator" and "sparseIterator" in "RealVector" hierarchy

2011-08-17 Thread Arne Ploese
compiler in cases where the > programmer knows which general class of matrix they have. > > On Wed, Aug 17, 2011 at 8:29 AM, Arne Ploese wrote: > > > Am Mittwoch, den 17.08.2011, 07:25 -0700 schrieb Ted Dunning: > > > Arne, > > > > > > Please read the thre

Re: [Math] "iterator" and "sparseIterator" in "RealVector" hierarchy

2011-08-17 Thread Arne Ploese
n be dropped? > > The point of doing so is that things are not that way now. Telling me that > they are not that way is pretty redundant. > > On Wed, Aug 17, 2011 at 2:37 AM, Arne Ploese wrote: > > > Currently sparseIterator is only used in RealVector, no matrix class >

Re: [Math] "iterator" and "sparseIterator" in "RealVector" hierarchy

2011-08-17 Thread Arne Ploese
Currently sparseIterator is only used in RealVector, no matrix class will be affected, because there is no sparseIterator. Search you sources for "sparseIterator" ? Arne Am Dienstag, den 16.08.2011, 14:09 -0700 schrieb Ted Dunning: > Here is an example from the perspective of somebody adding a ne

Re: [Math] "iterator" and "sparseIterator" in "RealVector" hierarchy

2011-08-17 Thread Arne Ploese
Ted, please just take your code and move Iterator sparseIterator(); from RealVector to SparseRealvector. Look then at the compiler errors, that are in most cases misuses of sparseIterator(). By the way most(all?) functions in CM return an array (dense) impementation as return type. You mentio

Re: [math] Read-only RealVector

2011-08-11 Thread Arne Ploese
Am Donnerstag, den 11.08.2011, 10:55 +0200 schrieb Sébastien Brisard: > 2011/8/11 Arne Ploese : > > So you not only want to observe the result, but you want a read only > > RealVector. > > > That's right. I'm sorry, my first message was not clear, especially if

Re: [math] Read-only RealVector

2011-08-11 Thread Arne Ploese
forseeable side effects - so maybe some test implementation is necessary to see whats happen. Am Donnerstag, den 11.08.2011, 10:08 +0200 schrieb Sébastien Brisard: > 2011/8/11 Arne Ploese : > > What methods do you need? > > > > Maybe an interface with: > > public int

Re: [math] Read-only RealVector

2011-08-11 Thread Arne Ploese
What methods do you need? Maybe an interface with: public interface SimpleRealVector { double getEntry(int i); int getDimension(); } will do? Am Donnerstag, den 11.08.2011, 05:36 +0200 schrieb Sébastien Brisard: > Hello, > this is an idea I've had while thinking about Iterative Linear > So

[math] Rename operator methods of RealVector

2011-08-09 Thread Arne Ploese
Hi, I think some method names that represent operators are wrong, at least inconsistent by naming and/or by implementation. I opend an issue: https://issues.apache.org/jira/browse/MATH-643 Comming from matlab/octave the octave operator .+ is specified ad element-by-element addition. http://ww

[math] Inherits doc and @Override

2011-07-21 Thread Arne Ploese
Hi, I saw in the sources serveral /** {@inheritDoc} */ on methods with @Override annotation. Javadoc knows to inherit the javadoc of the overwritten methos, so there is no need for @inheritDoc. If all agree, one could drop this if the code is modified? -

[math] class Complex enhancements

2011-07-20 Thread Arne Ploese
Hi, please review my latest patch for inclusion in svn https://issues.apache.org/jira/browse/MATH-577 Basically some short hand methods with takes a double (only real part) as parameter. Java docs some enhancements and cleanup. Add Complex.valueOf(double) and Complex.valueOf(double, double) that

Re: [math] add Complex.toString() and Howto handle NaN values properly

2011-07-12 Thread Arne Ploese
Am Dienstag, den 12.07.2011, 09:24 -0700 schrieb Phil Steitz: > On 7/12/11 8:49 AM, Arne Ploese wrote: > > Am Dienstag, den 12.07.2011, 16:24 +0200 schrieb Gilles Sadowski: > >> Hello. > >> > >>> I try to add the method toString() to Complex. > >&

Re: [math] add Complex.toString() and Howto handle NaN values properly

2011-07-12 Thread Arne Ploese
Am Dienstag, den 12.07.2011, 16:24 +0200 schrieb Gilles Sadowski: > Hello. > > > I try to add the method toString() to Complex. > > I've created an issue for this: > https://issues.apache.org/jira/browse/MATH-614 I would prefer something like: >>>return Double.valueOf(real) + imaginary < 0 ?

[math] multiply Infinity values

2011-07-12 Thread Arne Ploese
Hi, having a = new Complex(Double.POSITIVE_INFINITY, 0); b = new Complex(Double.NEGATIVE_INFINITY, 0); c = a.multipy(b); the result should be equals to new Complex(Double.NEGATIVE_INFINITY, 0) and not Complex.INF. Or I am wrong??? Arne

[math] add Complex.toString() and Howto handle NaN values properly

2011-07-12 Thread Arne Ploese
Hi, I try to add the method toString() to Complex. There some issues arise: If ether the real or imaginary part is NaN hashCode() will return the same value. Complex.toString() should return Double.valueOf(Double.NaN). Is thee a need to store the given values of the real/imaginary part? or set bo

[math][Math-5477]Complex enhancements

2011-07-06 Thread Arne Ploese
Hi, can you add the patch to svn? [ ] yes [ ] no, because ... Arne - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org

[math] change FieldMatrix.preMultipy(Fieldvector) to FieldVector.multiply(FieldMatrix)

2011-05-13 Thread Arne Ploese
Hi, IMHO it would be cleaner code to write v.multipy(m).someotherCalculations() instead (the current implementation) m.preMultiply(v)..someotherCalculations(). The execution order goes now strict from left to right... Arne -

[math] make org.apache.commons.math.linear.FieldVector iterable

2011-05-07 Thread Arne Ploese
Hi, it would be handy to simply iterate over the elements of the vector... Arne - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org