Commit 6919bfe8 authored by Roland Levillain's avatar Roland Levillain
Browse files

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'.
parent 870ac7ad
2012-10-10 Roland Levillain <roland@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@lrde.epita.fr>
 
Improve the test of the Fast Fourier Transform.
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment