* mln/transform/fft.hh
(internal::_fft<T>::transformed_image() const): Return a const
reference instead of a copy.
(internal::_fft<T>::transformed_image_clipped_magn(double, bool)):
Drop the const before the first argument.
Properly initialize `max'.
(internal::_fft<T>::transformed_image_log_magn(double, double, bool)):
Properly initialize `max'.
---
milena/ChangeLog | 13 +++++++++++++
milena/mln/transform/fft.hh | 10 +++++-----
2 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index bd06a16..9a9e6c4 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,16 @@
+2012-10-10 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Minor corrections in the Fast Fourier Transform.
+
+ * mln/transform/fft.hh
+ (internal::_fft<T>::transformed_image() const): Return a const
+ reference instead of a copy.
+ (internal::_fft<T>::transformed_image_clipped_magn(double, bool)):
+ Drop the const before the first argument.
+ Properly initialize `max'.
+ (internal::_fft<T>::transformed_image_log_magn(double, double, bool)):
+ Properly initialize `max'.
+
2012-10-09 Roland Levillain <roland(a)lrde.epita.fr>
Improve the test of the Fast Fourier Transform.
diff --git a/milena/mln/transform/fft.hh b/milena/mln/transform/fft.hh
index a010e47..ed1e87f 100644
--- a/milena/mln/transform/fft.hh
+++ b/milena/mln/transform/fft.hh
@@ -81,7 +81,7 @@ namespace mln {
**
** Const version.
*/
- const image2d< std::complex<T> > transformed_image() const
+ const image2d< std::complex<T> >& transformed_image() const
{
return trans_im;
}
@@ -156,14 +156,14 @@ namespace mln {
*/
template <class R>
- image2d<R> transformed_image_clipped_magn(const double clip,
+ image2d<R> transformed_image_clipped_magn(double clip,
bool ordered = true) const
{
// Check that R is real
image2d<R> new_im(trans_im.domain());
// check that clip is >=0 and <=1 ?
- double max;
+ double max = mln_min(double);
mln_piter(image2d<T>) it(trans_im.domain());
for_all(it)
@@ -209,7 +209,7 @@ namespace mln {
** \param clip Value used for clipping.
** \param ordered Kind of traversal.
*/
- image2d<T> transformed_image_clipped_magn(const double clip,
+ image2d<T> transformed_image_clipped_magn(double clip,
bool ordered = true) const
{
return transformed_image_clipped_magn<T>(clip, ordered);
@@ -271,7 +271,7 @@ namespace mln {
image2d<R> new_im(trans_im.domain());
- double max = 0;
+ double max = mln_min(double);
mln_piter(image2d<R>) it(trans_im.domain());
for_all(it)
--
1.7.2.5
Show replies by date