1 diff -uprN misc/vigra1.4.0/configure misc/build/vigra1.4.0/configure
2 --- misc/vigra1.4.0/configure Tue Dec 20 23:53:28 2005
3 +++ misc/build/vigra1.4.0/configure Wed Apr 4 20:35:48 2007
4 @@ -7259,7 +7259,7 @@ kfreebsd*-gnu)
8 - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
9 + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
10 version_type=freebsd-$objformat
13 @@ -10961,7 +10961,7 @@ kfreebsd*-gnu)
17 - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
18 + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
19 version_type=freebsd-$objformat
22 @@ -14110,7 +14110,7 @@ kfreebsd*-gnu)
26 - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
27 + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
28 version_type=freebsd-$objformat
31 @@ -16461,7 +16461,7 @@ kfreebsd*-gnu)
35 - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
36 + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
37 version_type=freebsd-$objformat
40 diff -uprN misc/vigra1.4.0/include/vigra/array_vector.hxx misc/build/vigra1.4.0/include/vigra/array_vector.hxx
41 --- misc/vigra1.4.0/include/vigra/array_vector.hxx 2005-12-21 05:53:30.000000000 +0100
42 +++ misc/build/vigra1.4.0/include/vigra/array_vector.hxx 2006-08-31 12:08:15.172679000 +0200
43 @@ -196,7 +196,38 @@ public:
44 iterator insert(iterator p, size_type n, value_type const & v);
46 template <class InputIterator>
47 - iterator insert(iterator p, InputIterator i, InputIterator iend);
48 + iterator insert(iterator p, InputIterator i, InputIterator iend)
50 + difference_type n = iend - i;
51 + difference_type pos = p - begin();
52 + size_type new_size = size() + n;
53 + if(new_size >= capacity_)
55 + pointer new_data = reserve_raw(new_size);
56 + std::uninitialized_copy(begin(), p, new_data);
57 + std::uninitialized_copy(i, iend, new_data + pos);
58 + std::uninitialized_copy(p, end(), new_data + pos + n);
59 + deallocate(data_, size_);
60 + capacity_ = new_size;
63 + else if(pos + n >= size_)
65 + size_type diff = pos + n - size_;
66 + std::uninitialized_copy(p, end(), end() + diff);
67 + std::uninitialized_copy(iend - diff, iend, end());
68 + std::copy(i, iend - diff, p);
72 + size_type diff = size_ - (pos + n);
73 + std::uninitialized_copy(end() - n, end(), end());
74 + std::copy_backward(p, p + diff, end());
75 + std::copy(i, iend, p);
78 + return begin() + pos;
81 iterator erase(iterator p);
83 @@ -260,23 +291,23 @@ ArrayVector<T, Alloc>::ArrayVector(Alloc
86 template <class T, class Alloc>
87 -ArrayVector<T, Alloc>::ArrayVector( size_type size, Alloc const & alloc)
88 +ArrayVector<T, Alloc>::ArrayVector( size_type sz, Alloc const & alloc)
92 - data_(reserve_raw(size))
95 + data_(reserve_raw(sz))
98 std::uninitialized_fill(data_, data_+size_, value_type());
101 template <class T, class Alloc>
102 -ArrayVector<T, Alloc>::ArrayVector( size_type size,
103 +ArrayVector<T, Alloc>::ArrayVector( size_type sz,
104 value_type const & initial, Alloc const & alloc)
108 - data_(reserve_raw(size))
111 + data_(reserve_raw(sz))
114 std::uninitialized_fill(data_, data_+size_, initial);
115 @@ -295,24 +326,24 @@ ArrayVector<T, Alloc>::ArrayVector( this
117 template <class T, class Alloc>
118 template <class InputIterator>
119 -ArrayVector<T, Alloc>::ArrayVector(InputIterator i, InputIterator end)
120 +ArrayVector<T, Alloc>::ArrayVector(InputIterator i, InputIterator iend)
122 - size_(std::distance(i, end)),
123 + size_(std::distance(i, iend)),
125 data_(reserve_raw(size_))
127 - std::uninitialized_copy(i, end, data_);
128 + std::uninitialized_copy(i, iend, data_);
131 template <class T, class Alloc>
132 template <class InputIterator>
133 -ArrayVector<T, Alloc>::ArrayVector(InputIterator i, InputIterator end, Alloc const & alloc)
134 +ArrayVector<T, Alloc>::ArrayVector(InputIterator i, InputIterator iend, Alloc const & alloc)
136 - size_(std::distance(i, end)),
137 + size_(std::distance(i, iend)),
139 data_(reserve_raw(size_))
141 - std::uninitialized_copy(i, end, data_);
142 + std::uninitialized_copy(i, iend, data_);
146 @@ -409,42 +440,6 @@ ArrayVector<T, Alloc>::insert(iterator p
149 template <class T, class Alloc>
150 -template <class InputIterator>
151 -typename ArrayVector<T, Alloc>::iterator
152 -ArrayVector<T, Alloc>::insert(iterator p, InputIterator i, InputIterator iend)
154 - difference_type n = iend - i;
155 - difference_type pos = p - begin();
156 - size_type new_size = size() + n;
157 - if(new_size >= capacity_)
159 - pointer new_data = reserve_raw(new_size);
160 - std::uninitialized_copy(begin(), p, new_data);
161 - std::uninitialized_copy(i, iend, new_data + pos);
162 - std::uninitialized_copy(p, end(), new_data + pos + n);
163 - deallocate(data_, size_);
164 - capacity_ = new_size;
167 - else if(pos + n >= size_)
169 - size_type diff = pos + n - size_;
170 - std::uninitialized_copy(p, end(), end() + diff);
171 - std::uninitialized_copy(iend - diff, iend, end());
172 - std::copy(i, iend - diff, p);
176 - size_type diff = size_ - (pos + n);
177 - std::uninitialized_copy(end() - n, end(), end());
178 - std::copy_backward(p, p + diff, end());
179 - std::copy(i, iend, p);
182 - return begin() + pos;
185 -template <class T, class Alloc>
186 typename ArrayVector<T, Alloc>::iterator
187 ArrayVector<T, Alloc>::erase(iterator p)
189 @@ -504,25 +499,25 @@ void ArrayVector<T, Alloc>::swap(this_ty
192 template <class T, class Alloc>
193 -void ArrayVector<T, Alloc>::deallocate(pointer data, size_type size)
194 +void ArrayVector<T, Alloc>::deallocate(pointer target_data, size_type sz)
198 - detail::destroy_n(data, size);
199 - alloc_.deallocate(data, size);
200 + detail::destroy_n(target_data, sz);
201 + alloc_.deallocate(target_data, sz);
205 template <class T, class Alloc>
206 typename ArrayVector<T, Alloc>::pointer
207 -ArrayVector<T, Alloc>::reserve_raw(size_type capacity)
208 +ArrayVector<T, Alloc>::reserve_raw(size_type cap)
212 + pointer new_data = 0;
215 - data = alloc_.allocate(capacity);
216 + new_data = alloc_.allocate(cap);
223 diff -uprN misc/vigra1.4.0/include/vigra/basicimage.hxx misc/build/vigra1.4.0/include/vigra/basicimage.hxx
224 --- misc/vigra1.4.0/include/vigra/basicimage.hxx 2005-12-21 05:53:30.000000000 +0100
225 +++ misc/build/vigra1.4.0/include/vigra/basicimage.hxx 2006-08-31 12:08:15.194050000 +0200
226 @@ -552,7 +552,11 @@ class BasicImage
227 typedef Alloc allocator_type;
229 typedef Alloc Allocator;
230 +#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS
231 typedef typename Alloc::template rebind<PIXELTYPE *>::other LineAllocator;
233 + typedef std::allocator<PIXELTYPE*> LineAllocator;
236 /** construct image of size 0x0
238 @@ -569,39 +573,51 @@ class BasicImage
242 +#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS
249 /** construct image of size width x height, use the specified allocator.
251 - BasicImage(int width, int height, Alloc const & alloc = Alloc())
252 + BasicImage(int w, int h, Alloc const & alloc = Alloc())
257 +#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS
263 - vigra_precondition((width >= 0) && (height >= 0),
264 - "BasicImage::BasicImage(int width, int height): "
265 + vigra_precondition((w >= 0) && (h >= 0),
266 + "BasicImage::BasicImage(int w, int h): "
267 "width and height must be >= 0.\n");
269 - resize(width, height, value_type());
270 + resize(w, h, value_type());
273 /** construct image of size size.x x size.y, use the specified allocator.
275 - explicit BasicImage(difference_type const & size, Alloc const & alloc = Alloc())
276 + explicit BasicImage(difference_type const & sz, Alloc const & alloc = Alloc())
281 +#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS
284 - vigra_precondition((size.x >= 0) && (size.y >= 0),
285 - "BasicImage::BasicImage(Diff2D size): "
286 - "size.x and size.y must be >= 0.\n");
291 + vigra_precondition((sz.x >= 0) && (sz.y >= 0),
292 + "BasicImage::BasicImage(Diff2D sz): "
293 + "sz.x and sz.y must be >= 0.\n");
295 - resize(size.x, size.y, value_type());
296 + resize(sz.x, sz.y, value_type());
299 /** construct image of size width*height and initialize every
300 @@ -609,71 +625,87 @@ class BasicImage
301 value_type doesn't have a default constructor).
302 Use the specified allocator.
304 - BasicImage(int width, int height, value_type const & d, Alloc const & alloc = Alloc())
305 + BasicImage(int w, int h, value_type const & d, Alloc const & alloc = Alloc())
310 +#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS
316 - vigra_precondition((width >= 0) && (height >= 0),
317 - "BasicImage::BasicImage(int width, int height, value_type const & ): "
318 + vigra_precondition((w >= 0) && (h >= 0),
319 + "BasicImage::BasicImage(int w, int h, value_type const & ): "
320 "width and height must be >= 0.\n");
322 - resize(width, height, d);
326 /** construct image of size size.x x size.y and initialize
327 every pixel with given data (use this constructor, if
328 value_type doesn't have a default constructor). Use the specified allocator.
330 - explicit BasicImage(difference_type const & size, value_type const & d, Alloc const & alloc = Alloc())
331 + explicit BasicImage(difference_type const & sz, value_type const & d, Alloc const & alloc = Alloc())
336 +#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS
339 - vigra_precondition((size.x >= 0) && (size.y >= 0),
340 - "BasicImage::BasicImage(Diff2D const & size, value_type const & v): "
341 - "size.x and size.y must be >= 0.\n");
346 + vigra_precondition((sz.x >= 0) && (sz.y >= 0),
347 + "BasicImage::BasicImage(Diff2D const & sz, value_type const & v): "
348 + "sz.x and sz.y must be >= 0.\n");
350 - resize(size.x, size.y, d);
351 + resize(sz.x, sz.y, d);
355 /** construct image of size width*height and copy the data from the
356 given C-style array \a d. Use the specified allocator.
358 - BasicImage(int width, int height, const_pointer d, Alloc const & alloc = Alloc())
359 + BasicImage(int w, int h, const_pointer d, Alloc const & alloc = Alloc())
364 +#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS
370 - vigra_precondition((width >= 0) && (height >= 0),
371 - "BasicImage::BasicImage(int width, int height, const_pointer ): "
372 + vigra_precondition((w >= 0) && (h >= 0),
373 + "BasicImage::BasicImage(int w, int h, const_pointer ): "
374 "width and height must be >= 0.\n");
376 - resizeCopy(width, height, d);
377 + resizeCopy(w, h, d);
380 /** construct image of size size.x x size.y and copy the data from the
381 given C-style array. Use the specified allocator.
383 - explicit BasicImage(difference_type const & size, const_pointer d, Alloc const & alloc = Alloc())
384 + explicit BasicImage(difference_type const & sz, const_pointer d, Alloc const & alloc = Alloc())
389 +#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS
392 - vigra_precondition((size.x >= 0) && (size.y >= 0),
393 - "BasicImage::BasicImage(Diff2D const & size, const_pointer): "
394 - "size.x and size.y must be >= 0.\n");
399 + vigra_precondition((sz.x >= 0) && (sz.y >= 0),
400 + "BasicImage::BasicImage(Diff2D const & sz, const_pointer): "
401 + "sz.x and sz.y must be >= 0.\n");
403 - resizeCopy(size.x, size.y, d);
404 + resizeCopy(sz.x, sz.y, d);
408 @@ -710,20 +742,20 @@ class BasicImage
409 /** reset image to specified size (dimensions must not be negative)
410 (old data are kept if new size matches old size)
412 - void resize(int width, int height)
413 + void resize(int w, int h)
415 - if(width != width_ || height != height_)
416 - resize(width, height, value_type());
417 + if(w != width_ || h != height_)
418 + resize(w, h, value_type());
421 /** reset image to specified size (dimensions must not be negative)
422 (old data are kept if new size matches old size)
424 - void resize(difference_type const & size)
425 + void resize(difference_type const & sz)
427 - if(size.x != width_ || size.y != height_)
428 + if(sz.x != width_ || sz.y != height_)
430 - resize(size.x, size.y, value_type());
431 + resize(sz.x, sz.y, value_type());
435 @@ -732,12 +764,12 @@ class BasicImage
436 constructor, dimensions must not be negative,
437 old data are kept if new size matches old size)
439 - void resize(int width, int height, value_type const & d);
440 + void resize(int w, int h, value_type const & d);
442 /** resize image to given size and initialize by copying data
443 from the C-style arra \a data.
445 - void resizeCopy(int width, int height, const_pointer data);
446 + void resizeCopy(int w, int h, const_pointer data);
448 /** resize image to size of other image and copy it's data
450 @@ -1046,30 +1078,30 @@ BasicImage<PIXELTYPE, Alloc>::init(value
452 template <class PIXELTYPE, class Alloc>
454 -BasicImage<PIXELTYPE, Alloc>::resize(int width, int height, value_type const & d)
455 +BasicImage<PIXELTYPE, Alloc>::resize(int w, int h, value_type const & d)
457 - vigra_precondition((width >= 0) && (height >= 0),
458 - "BasicImage::resize(int width, int height, value_type const &): "
459 + vigra_precondition((w >= 0) && (h >= 0),
460 + "BasicImage::resize(int w, int h, value_type const &): "
461 "width and height must be >= 0.\n");
463 - if (width_ != width || height_ != height) // change size?
464 + if (width_ != w || height_ != h) // change size?
466 value_type * newdata = 0;
467 value_type ** newlines = 0;
468 - if(width*height > 0)
471 - if (width*height != width_*height_) // different sizes, must reallocate
472 + if (w*h != width_*height_) // different sizes, must reallocate
474 - newdata = allocator_.allocate(width*height);
475 - std::uninitialized_fill_n(newdata, width*height, d);
476 - newlines = initLineStartArray(newdata, width, height);
477 + newdata = allocator_.allocate(w*h);
478 + std::uninitialized_fill_n(newdata, w*h, d);
479 + newlines = initLineStartArray(newdata, w, h);
482 else // need only to reshape
485 - std::fill_n(newdata, width*height, d);
486 - newlines = initLineStartArray(newdata, width, height);
487 + std::fill_n(newdata, w*h, d);
488 + newlines = initLineStartArray(newdata, w, h);
489 pallocator_.deallocate(lines_, height_);
492 @@ -1080,22 +1112,22 @@ BasicImage<PIXELTYPE, Alloc>::resize(int
501 - else if(width*height > 0) // keep size, re-init data
502 + else if(w*h > 0) // keep size, re-init data
504 - std::fill_n(data_, width*height, d);
505 + std::fill_n(data_, w*h, d);
510 template <class PIXELTYPE, class Alloc>
512 -BasicImage<PIXELTYPE, Alloc>::resizeCopy(int width, int height, const_pointer data)
513 +BasicImage<PIXELTYPE, Alloc>::resizeCopy(int w, int h, const_pointer src_data)
515 - int newsize = width*height;
516 - if (width_ != width || height_ != height) // change size?
518 + if (width_ != w || height_ != h) // change size?
520 value_type * newdata = 0;
521 value_type ** newlines = 0;
522 @@ -1104,15 +1136,15 @@ BasicImage<PIXELTYPE, Alloc>::resizeCopy
523 if (newsize != width_*height_) // different sizes, must reallocate
525 newdata = allocator_.allocate(newsize);
526 - std::uninitialized_copy(data, data + newsize, newdata);
527 - newlines = initLineStartArray(newdata, width, height);
528 + std::uninitialized_copy(src_data, src_data + newsize, newdata);
529 + newlines = initLineStartArray(newdata, w, h);
532 else // need only to reshape
535 - std::copy(data, data + newsize, newdata);
536 - newlines = initLineStartArray(newdata, width, height);
537 + std::copy(src_data, src_data + newsize, newdata);
538 + newlines = initLineStartArray(newdata, w, h);
539 pallocator_.deallocate(lines_, height_);
542 @@ -1123,12 +1155,12 @@ BasicImage<PIXELTYPE, Alloc>::resizeCopy
551 else if(newsize > 0) // keep size, copy data
553 - std::copy(data, data + newsize, data_);
554 + std::copy(src_data, src_data + newsize, data_);
558 @@ -1163,11 +1195,11 @@ BasicImage<PIXELTYPE, Alloc>::deallocate
560 template <class PIXELTYPE, class Alloc>
562 -BasicImage<PIXELTYPE, Alloc>::initLineStartArray(value_type * data, int width, int height)
563 +BasicImage<PIXELTYPE, Alloc>::initLineStartArray(value_type * src_data, int w, int h)
565 - value_type ** lines = pallocator_.allocate(height);
566 - for(int y=0; y<height; ++y)
567 - lines[y] = data + y*width;
568 + value_type ** lines = pallocator_.allocate(h);
569 + for(int y=0; y<h; ++y)
570 + lines[y] = src_data + y*w;
574 diff -uprN misc/vigra1.4.0/include/vigra/basicimageview.hxx misc/build/vigra1.4.0/include/vigra/basicimageview.hxx
575 --- misc/vigra1.4.0/include/vigra/basicimageview.hxx 2005-12-21 05:53:30.000000000 +0100
576 +++ misc/build/vigra1.4.0/include/vigra/basicimageview.hxx 2006-08-31 12:08:15.219210000 +0200
577 @@ -176,20 +176,20 @@ class BasicImageView
579 /** construct view of size w x h
581 - BasicImageView(const_pointer data, int w, int h, int stride = 0)
582 - : data_(const_cast<pointer>(data)),
583 + BasicImageView(const_pointer src_data, int w, int h, int data_stride = 0)
584 + : data_(const_cast<pointer>(src_data)),
587 - stride_(stride == 0 ? w : stride)
588 + stride_(data_stride == 0 ? w : data_stride)
591 /** construct view of size size.x x size.y
593 - BasicImageView(const_pointer data, difference_type const & size, int stride = 0)
594 - : data_(const_cast<pointer>(data)),
597 - stride_(stride == 0 ? size.x : stride)
598 + BasicImageView(const_pointer src_data, difference_type const & sz, int data_stride = 0)
599 + : data_(const_cast<pointer>(src_data)),
602 + stride_(data_stride == 0 ? sz.x : data_stride)
605 /** set Image with const value
606 diff -uprN misc/vigra1.4.0/include/vigra/boundarytensor.hxx misc/build/vigra1.4.0/include/vigra/boundarytensor.hxx
607 --- misc/vigra1.4.0/include/vigra/boundarytensor.hxx 2005-12-21 05:53:31.000000000 +0100
608 +++ misc/build/vigra1.4.0/include/vigra/boundarytensor.hxx 2006-08-31 12:08:15.240695000 +0200
609 @@ -71,8 +71,8 @@ initGaussianPolarFilters1(double std_dev
610 int radius = (int)(4.0*std_dev + 0.5);
611 std_dev *= 1.08179074376;
612 double f = 1.0 / VIGRA_CSTD::sqrt(2.0 * M_PI) / std_dev; // norm
613 - double a = 0.558868151788 / VIGRA_CSTD::pow(std_dev, 5);
614 - double b = -2.04251639729 / VIGRA_CSTD::pow(std_dev, 3);
615 + double a = 0.558868151788 / VIGRA_CSTD::pow(std_dev, 5.0);
616 + double b = -2.04251639729 / VIGRA_CSTD::pow(std_dev, 3.0);
617 double sigma22 = -0.5 / std_dev / std_dev;
620 @@ -175,7 +175,7 @@ initGaussianPolarFilters3(double std_dev
621 std_dev *= 1.15470053838;
622 double sigma22 = -0.5 / std_dev / std_dev;
623 double f = 1.0 / VIGRA_CSTD::sqrt(2.0 * M_PI) / std_dev; // norm
624 - double a = 0.883887052922 / VIGRA_CSTD::pow(std_dev, 5);
625 + double a = 0.883887052922 / VIGRA_CSTD::pow(std_dev, 5.0);
627 for(unsigned int i=0; i<k.size(); ++i)
629 @@ -183,7 +183,7 @@ initGaussianPolarFilters3(double std_dev
630 k[i].setBorderTreatment(BORDER_TREATMENT_REFLECT);
633 - double b = -1.3786348292 / VIGRA_CSTD::pow(std_dev, 3);
634 + double b = -1.3786348292 / VIGRA_CSTD::pow(std_dev, 3.0);
637 iterator c = k[0].center();
638 diff -uprN misc/vigra1.4.0/include/vigra/config.hxx misc/build/vigra1.4.0/include/vigra/config.hxx
639 --- misc/vigra1.4.0/include/vigra/config.hxx 2005-12-21 05:53:31.000000000 +0100
640 +++ misc/build/vigra1.4.0/include/vigra/config.hxx 2006-08-31 12:08:15.261488000 +0200
642 #endif // VIGRA_NO_STD_MINMAX
643 #endif // (_MSC_VER < 1300)
645 + #if _MSC_VER <= 1310
646 + #ifndef CMATH_NOT_IN_STD
647 + #define CMATH_NOT_IN_STD
649 + #endif // _MSC_VER < 1310
652 #define NO_PARTIAL_TEMPLATE_SPECIALIZATION
653 #define NO_OUT_OF_LINE_MEMBER_TEMPLATES
654 diff -uprN misc/vigra1.4.0/include/vigra/diff2d.hxx misc/build/vigra1.4.0/include/vigra/diff2d.hxx
655 --- misc/vigra1.4.0/include/vigra/diff2d.hxx 2005-12-21 05:53:33.000000000 +0100
656 +++ misc/build/vigra1.4.0/include/vigra/diff2d.hxx 2006-08-31 12:08:15.282334000 +0200
657 @@ -490,8 +490,8 @@ public:
659 /** Construct point at given position.
661 - Size2D(int width, int height)
662 - : Diff2D(width, height)
663 + Size2D(int w, int h)
667 /** Copy Constructor.
668 @@ -606,8 +606,8 @@ public:
670 /** Construct point at given position.
672 - Point2D(int x, int y)
674 + Point2D(int x_, int y_)
678 /** Copy Constructor.
679 @@ -870,26 +870,26 @@ public:
680 * (lowerRight is considered to be outside the rectangle as
681 * usual in the VIGRA)
683 - Rect2D(Point2D const &upperLeft, Point2D const &lowerRight)
684 - : upperLeft_(upperLeft), lowerRight_(lowerRight)
685 + Rect2D(Point2D const &ul, Point2D const &lr)
686 + : upperLeft_(ul), lowerRight_(lr)
689 /** Construct a rectangle representing the given range
691 - Rect2D(int left, int top, int right, int bottom)
692 - : upperLeft_(left, top), lowerRight_(right, bottom)
693 + Rect2D(int l, int t, int r, int b)
694 + : upperLeft_(l,t), lowerRight_(r,b)
697 /** Construct a rectangle of given position and size
699 - Rect2D(Point2D const &upperLeft, Size2D const &size)
700 - : upperLeft_(upperLeft), lowerRight_(upperLeft + size)
701 + Rect2D(Point2D const &ul, Size2D const &sz)
702 + : upperLeft_(ul), lowerRight_(ul + sz)
705 /** Construct a rectangle of given size at position (0,0)
707 - explicit Rect2D(Size2D const &size)
708 - : lowerRight_(Point2D(size))
709 + explicit Rect2D(Size2D const &sz)
710 + : lowerRight_(Point2D(sz))
713 /** Return the first point (scan-order wise) which is
714 @@ -936,9 +936,9 @@ public:
715 /** Move the whole rectangle so that upperLeft() will become
716 * Point2D(left, top) afterwards.
718 - void moveTo(int left, int top)
719 + void moveTo(int l, int t)
721 - moveTo(Point2D(left, top));
722 + moveTo(Point2D(l, t));
725 /** Move the whole rectangle by the given 2D offset.
726 @@ -1023,17 +1023,17 @@ public:
727 /** Resize this rectangle to the given extents. This will move
728 * the lower right corner only.
730 - void setSize(Size2D const &size)
731 + void setSize(Size2D const &sz)
733 - lowerRight_ = upperLeft_ + size;
734 + lowerRight_ = upperLeft_ + sz;
737 /** Resize this rectangle to the given extents. This will move
738 * the lower right corner only.
740 - void setSize(int width, int height)
741 + void setSize(int w, int h)
743 - lowerRight_ = upperLeft_ + Size2D(width, height);
744 + lowerRight_ = upperLeft_ + Size2D(w, h);
747 /** Increase the size of the rectangle by the given offset. This
748 diff -uprN misc/vigra1.4.0/include/vigra/fftw.hxx misc/build/vigra1.4.0/include/vigra/fftw.hxx
749 --- misc/vigra1.4.0/include/vigra/fftw.hxx 2005-12-21 05:53:34.000000000 +0100
750 +++ misc/build/vigra1.4.0/include/vigra/fftw.hxx 2006-08-31 12:08:15.308081000 +0200
751 @@ -399,8 +399,6 @@ inline FFTWComplex operator /(FFTWComple
755 -using VIGRA_CSTD::abs;
757 inline FFTWComplex::value_type abs(const FFTWComplex &a)
759 return a.magnitude();
760 diff -uprN misc/vigra1.4.0/include/vigra/fftw3.hxx misc/build/vigra1.4.0/include/vigra/fftw3.hxx
761 --- misc/vigra1.4.0/include/vigra/fftw3.hxx 2005-12-21 05:53:34.000000000 +0100
762 +++ misc/build/vigra1.4.0/include/vigra/fftw3.hxx 2006-08-31 12:08:15.337248000 +0200
763 @@ -572,8 +572,6 @@ inline FFTWComplex operator /(FFTWComple
767 -using VIGRA_CSTD::abs;
769 /// absolute value (= magnitude)
770 inline FFTWComplex::value_type abs(const FFTWComplex &a)
772 diff -uprN misc/vigra1.4.0/include/vigra/fixedpoint.hxx misc/build/vigra1.4.0/include/vigra/fixedpoint.hxx
773 --- misc/vigra1.4.0/include/vigra/fixedpoint.hxx 2005-12-21 05:53:34.000000000 +0100
774 +++ misc/build/vigra1.4.0/include/vigra/fixedpoint.hxx 2006-08-31 12:08:15.367651000 +0200
775 @@ -118,20 +118,18 @@ enum FixedPointNoShift { FPNoShift };
779 -template <bool MustRound>
780 +template <bool MustRound, int N>
781 struct FPAssignWithRound;
784 -struct FPAssignWithRound<false>
786 +struct FPAssignWithRound<false, N>
789 static inline int exec(int v) { return v << (-N); }
793 -struct FPAssignWithRound<true>
795 +struct FPAssignWithRound<true, N>
798 static inline int exec(int const v)
800 return (v + (1 << (N - 1))) >> (N);
801 @@ -276,7 +274,7 @@ public:
803 template <unsigned Int2, unsigned Frac2>
804 FixedPoint(const FixedPoint<Int2, Frac2> &other)
805 - : value(detail::FPAssignWithRound<(Frac2 > FractionalBits)>::template exec<Frac2 - FractionalBits>(other.value))
806 + : value(detail::FPAssignWithRound<(Frac2 > FractionalBits), Frac2 - FractionalBits>::exec(other.value))
808 VIGRA_STATIC_ASSERT((FixedPoint_overflow_error__More_than_31_bits_requested<(IntBits + FractionalBits)>));
809 VIGRA_STATIC_ASSERT((FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits >= Int2)>));
810 @@ -321,7 +319,7 @@ public:
811 FixedPoint & operator=(const FixedPoint<Int2, Frac2> &other)
813 VIGRA_STATIC_ASSERT((FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits >= Int2)>));
814 - value = detail::FPAssignWithRound<(Frac2 > FractionalBits)>::template exec<Frac2 - FractionalBits>(other.value);
815 + value = detail::FPAssignWithRound<(Frac2 > FractionalBits),Frac2 - FractionalBits>::exec(other.value);
819 @@ -373,7 +371,7 @@ public:
820 FixedPoint & operator+=(const FixedPoint<Int2, Frac2> &other)
822 VIGRA_STATIC_ASSERT((FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits >= Int2)>));
823 - value += detail::FPAssignWithRound<(Frac2 > FractionalBits)>::template exec<Frac2 - FractionalBits>(other.value);
824 + value += detail::FPAssignWithRound<(Frac2 > FractionalBits),Frac2 - FractionalBits>::exec(other.value);
828 @@ -384,7 +382,7 @@ public:
829 FixedPoint & operator-=(const FixedPoint<Int2, Frac2> &other)
831 VIGRA_STATIC_ASSERT((FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits >= Int2)>));
832 - value -= detail::FPAssignWithRound<(Frac2 > FractionalBits)>::template exec<Frac2 - FractionalBits>(other.value);
833 + value -= detail::FPAssignWithRound<(Frac2 > FractionalBits),Frac2 - FractionalBits>::exec(other.value);
837 @@ -428,12 +426,12 @@ struct FixedPointCast<type> \
841 -VIGRA_FIXED_POINT_CAST(Int8);
842 -VIGRA_FIXED_POINT_CAST(UInt8);
843 -VIGRA_FIXED_POINT_CAST(Int16);
844 -VIGRA_FIXED_POINT_CAST(UInt16);
845 -VIGRA_FIXED_POINT_CAST(Int32);
846 -VIGRA_FIXED_POINT_CAST(UInt32);
847 +VIGRA_FIXED_POINT_CAST(Int8)
848 +VIGRA_FIXED_POINT_CAST(UInt8)
849 +VIGRA_FIXED_POINT_CAST(Int16)
850 +VIGRA_FIXED_POINT_CAST(UInt16)
851 +VIGRA_FIXED_POINT_CAST(Int32)
852 +VIGRA_FIXED_POINT_CAST(UInt32)
854 #undef VIGRA_FIXED_POINT_CAST
856 diff -uprN misc/vigra1.4.0/include/vigra/gaborfilter.hxx misc/build/vigra1.4.0/include/vigra/gaborfilter.hxx
857 --- misc/vigra1.4.0/include/vigra/gaborfilter.hxx 2005-12-21 05:53:35.000000000 +0100
858 +++ misc/build/vigra1.4.0/include/vigra/gaborfilter.hxx 2006-08-31 12:08:15.389636000 +0200
859 @@ -289,7 +289,11 @@ inline double angularGaborSigma(int dire
862 template <class ImageType,
863 +#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS
864 class Alloc = typename ImageType::allocator_type::template rebind<ImageType>::other >
866 + class Alloc = std::allocator<ImageType> >
868 class GaborFilterFamily
869 : public ImageArray<ImageType, Alloc>
871 diff -uprN misc/vigra1.4.0/include/vigra/gaussians.hxx misc/build/vigra1.4.0/include/vigra/gaussians.hxx
872 --- misc/vigra1.4.0/include/vigra/gaussians.hxx 2005-12-21 05:53:35.000000000 +0100
873 +++ misc/build/vigra1.4.0/include/vigra/gaussians.hxx 2006-08-31 12:08:15.409790000 +0200
874 @@ -88,26 +88,26 @@ class Gaussian
878 - explicit Gaussian(T sigma = 1.0, unsigned int derivativeOrder = 0)
880 - sigma2_(-0.5 / sigma / sigma),
881 + explicit Gaussian(T s = 1.0, unsigned int derivOrder = 0)
883 + sigma2_(-0.5 / s / s),
885 - order_(derivativeOrder),
886 - hermitePolynomial_(derivativeOrder / 2 + 1)
887 + order_(derivOrder),
888 + hermitePolynomial_(derivOrder / 2 + 1)
890 - vigra_precondition(sigma_ > 0.0,
891 + vigra_precondition(s > 0.0,
892 "Gaussian::Gaussian(): sigma > 0 required.");
897 - norm_ = -1.0 / (VIGRA_CSTD::sqrt(2.0 * M_PI) * sq(sigma) * sigma);
898 + norm_ = -1.0 / (VIGRA_CSTD::sqrt(2.0 * M_PI) * sq(s) * s);
901 - norm_ = 1.0 / (VIGRA_CSTD::sqrt(2.0 * M_PI) * sq(sigma) * sq(sigma) * sigma);
902 + norm_ = 1.0 / (VIGRA_CSTD::sqrt(2.0 * M_PI) * sq(s) * sq(s) * s);
905 - norm_ = 1.0 / VIGRA_CSTD::sqrt(2.0 * M_PI) / sigma;
906 + norm_ = 1.0 / VIGRA_CSTD::sqrt(2.0 * M_PI) / s;
908 calculateHermitePolynomial();
910 diff -uprN misc/vigra1.4.0/include/vigra/imagecontainer.hxx misc/build/vigra1.4.0/include/vigra/imagecontainer.hxx
911 --- misc/vigra1.4.0/include/vigra/imagecontainer.hxx 2005-12-21 05:53:36.000000000 +0100
912 +++ misc/build/vigra1.4.0/include/vigra/imagecontainer.hxx 2006-08-31 12:08:15.429159000 +0200
913 @@ -70,7 +70,11 @@ namespace vigra {
916 template <class ImageType,
917 +#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS
918 class Alloc = typename ImageType::allocator_type::template rebind<ImageType>::other >
920 + class Alloc = std::allocator<ImageType> >
925 diff -uprN misc/vigra1.4.0/include/vigra/mathutil.hxx misc/build/vigra1.4.0/include/vigra/mathutil.hxx
926 --- misc/vigra1.4.0/include/vigra/mathutil.hxx 2005-12-21 05:53:39.000000000 +0100
927 +++ misc/build/vigra1.4.0/include/vigra/mathutil.hxx 2006-08-31 12:08:15.449199000 +0200
934 /** \addtogroup MathFunctions Mathematical Functions
936 Useful mathematical functions and functors.
937 @@ -109,18 +107,11 @@ double erf(T x)
943 -using VIGRA_CSTD::erf;
947 // import functions into namespace vigra which VIGRA is going to overload
949 using VIGRA_CSTD::pow;
950 using VIGRA_CSTD::floor;
951 using VIGRA_CSTD::ceil;
954 #define VIGRA_DEFINE_UNSIGNED_ABS(T) \
955 inline T abs(T t) { return t; }
956 @@ -130,9 +121,39 @@ VIGRA_DEFINE_UNSIGNED_ABS(unsigned char)
957 VIGRA_DEFINE_UNSIGNED_ABS(unsigned short)
958 VIGRA_DEFINE_UNSIGNED_ABS(unsigned int)
959 VIGRA_DEFINE_UNSIGNED_ABS(unsigned long)
960 +#ifdef VIGRA_HAS_LONG_LONG
961 +VIGRA_DEFINE_UNSIGNED_ABS(unsigned long long)
964 #undef VIGRA_DEFINE_UNSIGNED_ABS
966 +#define VIGRA_DEFINE_SIGNED_ABS(T) \
967 + inline T abs(T t) { return (T)abs(t); }
968 +#define VIGRA_DEFINE_SIGNED_LABS(T) \
969 + inline T abs(T t) { return (T)labs(t); }
970 +#define VIGRA_DEFINE_SIGNED_LLABS(T) \
971 + inline T abs(T t) { return (T)llabs(t); }
972 +#define VIGRA_DEFINE_FABS(T) \
973 + inline T abs(T t) { return (T)fabs(t); }
975 +VIGRA_DEFINE_SIGNED_ABS(signed char)
976 +VIGRA_DEFINE_SIGNED_ABS(signed short)
977 +VIGRA_DEFINE_SIGNED_ABS(signed int)
978 +VIGRA_DEFINE_SIGNED_LABS(signed long)
979 +#ifdef VIGRA_HAS_LONG_LONG
980 +VIGRA_DEFINE_SIGNED_LLABS(signed long long)
982 +VIGRA_DEFINE_FABS(float)
983 +VIGRA_DEFINE_FABS(double)
984 +#ifdef VIGRA_HAS_LONG_DOUBLE
985 +VIGRA_DEFINE_FABS(long double)
988 +#undef VIGRA_DEFINE_SIGNED_ABS
989 +#undef VIGRA_DEFINE_SIGNED_LABS
990 +#undef VIGRA_DEFINE_SIGNED_LLABS
991 +#undef VIGRA_DEFINE_FABS
993 /*! The rounding function.
995 Defined for all floating point types. Rounds towards the nearest integer for both
996 @@ -155,12 +176,14 @@ inline double round(double t)
1000 +#ifdef VIGRA_HAS_LONG_DOUBLE
1001 inline long double round(long double t)
1009 /*! The square function.
1011 @@ -371,9 +394,15 @@ VIGRA_DEFINE_NORM(int)
1012 VIGRA_DEFINE_NORM(unsigned int)
1013 VIGRA_DEFINE_NORM(long)
1014 VIGRA_DEFINE_NORM(unsigned long)
1015 +#ifdef VIGRA_HAS_LONG_LONG
1016 +VIGRA_DEFINE_NORM(long long)
1017 +VIGRA_DEFINE_NORM(unsigned long long)
1019 VIGRA_DEFINE_NORM(float)
1020 VIGRA_DEFINE_NORM(double)
1021 +#ifdef VIGRA_HAS_LONG_DOUBLE
1022 VIGRA_DEFINE_NORM(long double)
1025 #undef VIGRA_DEFINE_NORM
1027 diff -uprN misc/vigra1.4.0/include/vigra/numerictraits.hxx misc/build/vigra1.4.0/include/vigra/numerictraits.hxx
1028 --- misc/vigra1.4.0/include/vigra/numerictraits.hxx 2005-12-21 05:53:41.000000000 +0100
1029 +++ misc/build/vigra1.4.0/include/vigra/numerictraits.hxx 2006-08-31 12:08:15.474422000 +0200
1030 @@ -891,6 +891,90 @@ struct NumericTraits<unsigned long>
1034 +#ifdef VIGRA_HAS_LONG_LONG
1036 +struct NumericTraits<long long>
1038 + typedef long long Type;
1039 + typedef long long Promote;
1040 + typedef double RealPromote;
1041 + typedef std::complex<RealPromote> ComplexPromote;
1042 + typedef Type ValueType;
1044 + typedef VigraTrueType isIntegral;
1045 + typedef VigraTrueType isScalar;
1046 + typedef VigraTrueType isSigned;
1047 + typedef VigraTrueType isOrdered;
1048 + typedef VigraFalseType isComplex;
1050 + static long long zero() { return 0; }
1051 + static long long one() { return 1; }
1052 + static long long nonZero() { return 1; }
1053 + static long long min() { return LLONG_MIN; }
1054 + static long long max() { return LLONG_MAX; }
1056 +#ifdef NO_INLINE_STATIC_CONST_DEFINITION
1057 + enum { minConst = LONG_MIN, maxConst = LLONG_MAX };
1059 + static const long long minConst = LLONG_MIN;
1060 + static const long long maxConst = LLONG_MAX;
1063 + static Promote toPromote(long long v) { return v; }
1064 + static RealPromote toRealPromote(long long v) { return v; }
1065 + static long long fromPromote(Promote v) { return v; }
1066 + static long long fromRealPromote(RealPromote v) {
1068 + ? ((v < (RealPromote)LLONG_MIN)
1070 + : static_cast<long long>(v - 0.5))
1071 + : ((v > (RealPromote)LLONG_MAX)
1073 + : static_cast<long long>(v + 0.5)));
1078 +struct NumericTraits<unsigned long long>
1080 + typedef unsigned long long Type;
1081 + typedef unsigned long long Promote;
1082 + typedef double RealPromote;
1083 + typedef std::complex<RealPromote> ComplexPromote;
1084 + typedef Type ValueType;
1086 + typedef VigraTrueType isIntegral;
1087 + typedef VigraTrueType isScalar;
1088 + typedef VigraFalseType isSigned;
1089 + typedef VigraTrueType isOrdered;
1090 + typedef VigraFalseType isComplex;
1092 + static unsigned long long zero() { return 0; }
1093 + static unsigned long long one() { return 1; }
1094 + static unsigned long long nonZero() { return 1; }
1095 + static unsigned long long min() { return 0; }
1096 + static unsigned long long max() { return ULLONG_MAX; }
1098 +#ifdef NO_INLINE_STATIC_CONST_DEFINITION
1099 + enum { minConst = 0, maxConst = ULLONG_MAX };
1101 + static const unsigned long long minConst = 0;
1102 + static const unsigned long long maxConst = ULLONG_MAX;
1105 + static Promote toPromote(unsigned long long v) { return v; }
1106 + static RealPromote toRealPromote(unsigned long long v) { return v; }
1107 + static unsigned long long fromPromote(Promote v) { return v; }
1108 + static unsigned long long fromRealPromote(RealPromote v) {
1111 + : ((v > (RealPromote)ULLONG_MAX)
1113 + : static_cast<unsigned long long>(v + 0.5)));
1119 struct NumericTraits<float>
1121 @@ -949,6 +1033,7 @@ struct NumericTraits<double>
1122 static double fromRealPromote(RealPromote v) { return v; }
1125 +#ifdef VIGRA_HAS_LONG_DOUBLE
1127 struct NumericTraits<long double>
1129 @@ -977,6 +1062,7 @@ struct NumericTraits<long double>
1130 static long double fromPromote(Promote v) { return v; }
1131 static long double fromRealPromote(RealPromote v) { return v; }
1135 #ifndef NO_PARTIAL_TEMPLATE_SPECIALIZATION
1137 @@ -1055,9 +1141,15 @@ VIGRA_DEFINE_NORM_TRAITS(int)
1138 VIGRA_DEFINE_NORM_TRAITS(unsigned int)
1139 VIGRA_DEFINE_NORM_TRAITS(long)
1140 VIGRA_DEFINE_NORM_TRAITS(unsigned long)
1141 +#ifdef VIGRA_HAS_LONG_LONG
1142 +VIGRA_DEFINE_NORM_TRAITS(long long)
1143 +VIGRA_DEFINE_NORM_TRAITS(unsigned long long)
1145 VIGRA_DEFINE_NORM_TRAITS(float)
1146 VIGRA_DEFINE_NORM_TRAITS(double)
1147 +#ifdef VIGRA_HAS_LONG_DOUBLE
1148 VIGRA_DEFINE_NORM_TRAITS(long double)
1151 #undef VIGRA_DEFINE_NORM_TRAITS
1153 diff -uprN misc/vigra1.4.0/include/vigra/orientedtensorfilters.hxx misc/build/vigra1.4.0/include/vigra/orientedtensorfilters.hxx
1154 --- misc/vigra1.4.0/include/vigra/orientedtensorfilters.hxx 2005-12-21 05:53:42.000000000 +0100
1155 +++ misc/build/vigra1.4.0/include/vigra/orientedtensorfilters.hxx 2006-08-31 12:08:15.503678000 +0200
1156 @@ -434,7 +434,7 @@ class Sin6RingKernel
1157 if(x == 0 && y == 0)
1158 return weights_(radius_, radius_);
1159 double d = dot(vectors_(x+radius_, y+radius_), v);
1160 - return VIGRA_CSTD::pow(1.0 - d * d, 3) * weights_(x+radius_, y+radius_);
1161 + return VIGRA_CSTD::pow(1.0 - d * d, 3.0) * weights_(x+radius_, y+radius_);
1165 @@ -455,7 +455,7 @@ class Sin6Kernel
1166 if(x == 0 && y == 0)
1167 return weights_(radius_, radius_);
1168 double d = dot(vectors_(x+radius_, y+radius_), v);
1169 - return VIGRA_CSTD::pow(1.0 - d * d, 3) * weights_(x+radius_, y+radius_);
1170 + return VIGRA_CSTD::pow(1.0 - d * d, 3.0) * weights_(x+radius_, y+radius_);
1174 @@ -476,7 +476,7 @@ class Cos6RingKernel
1175 if(x == 0 && y == 0)
1176 return weights_(radius_, radius_);
1177 double d = dot(vectors_(x+radius_, y+radius_), v);
1178 - return (1.0 - VIGRA_CSTD::pow(1.0 - d * d, 3)) * weights_(x+radius_, y+radius_);
1179 + return (1.0 - VIGRA_CSTD::pow(1.0 - d * d, 3.0)) * weights_(x+radius_, y+radius_);
1183 @@ -497,7 +497,7 @@ class Cos6Kernel
1184 if(x == 0 && y == 0)
1185 return weights_(radius_, radius_);
1186 double d = dot(vectors_(x+radius_, y+radius_), v);
1187 - return (1.0 - VIGRA_CSTD::pow(1.0 - d * d, 3)) * weights_(x+radius_, y+radius_);
1188 + return (1.0 - VIGRA_CSTD::pow(1.0 - d * d, 3.0)) * weights_(x+radius_, y+radius_);
1192 diff -uprN misc/vigra1.4.0/include/vigra/polynomial.hxx misc/build/vigra1.4.0/include/vigra/polynomial.hxx
1193 --- misc/vigra1.4.0/include/vigra/polynomial.hxx 2005-12-21 05:53:42.000000000 +0100
1194 +++ misc/build/vigra1.4.0/include/vigra/polynomial.hxx 2006-08-31 12:08:15.526572000 +0200
1195 @@ -118,10 +118,10 @@ class PolynomialView
1196 of subsequent algorithms (especially root finding) performed on the
1199 - PolynomialView(T * coeffs, unsigned int order, double epsilon = 1.0e-14)
1200 + PolynomialView(T * coeffs, unsigned int ord, double eps = 1.0e-14)
1208 /// Access the coefficient of x^i
1209 @@ -244,16 +244,16 @@ class PolynomialView
1213 - PolynomialView(double epsilon = 1e-14)
1214 + PolynomialView(double eps = 1e-14)
1221 - void setCoeffs(T * coeffs, unsigned int order)
1222 + void setCoeffs(T * coeffs, unsigned int ord)
1230 @@ -396,9 +396,9 @@ PolynomialView<T>::deflateConjugatePair(
1234 -PolynomialView<T>::minimizeOrder(double epsilon)
1235 +PolynomialView<T>::minimizeOrder(double eps)
1237 - while(std::abs(coeffs_[order_]) <= epsilon && order_ > 0)
1238 + while(std::abs(coeffs_[order_]) <= eps && order_ > 0)
1242 diff -uprN misc/vigra1.4.0/include/vigra/recursiveconvolution.hxx misc/build/vigra1.4.0/include/vigra/recursiveconvolution.hxx
1243 --- misc/vigra1.4.0/include/vigra/recursiveconvolution.hxx 2005-12-21 05:53:42.000000000 +0100
1244 +++ misc/build/vigra1.4.0/include/vigra/recursiveconvolution.hxx 2006-08-31 12:08:15.553556000 +0200
1245 @@ -259,16 +259,16 @@ void recursiveFilterLine(SrcIterator is,
1247 // correction factors for b
1249 - double bleft = VIGRA_CSTD::pow(b, w);
1250 + double bleft = VIGRA_CSTD::pow(b, (double)w);
1252 for(x=w-1; x>=0; --x, --is, --id)
1254 TempType f = b * old;
1256 - double norm = (1.0 - b) / (1.0 + b - bleft - bright);
1257 + double norm2 = (1.0 - b) / (1.0 + b - bleft - bright);
1260 - ad.set(norm * (line[x] + f), id);
1261 + ad.set(norm2 * (line[x] + f), id);
1264 else if(border == BORDER_TREATMENT_AVOID)
1265 diff -uprN misc/vigra1.4.0/include/vigra/rgbvalue.hxx misc/build/vigra1.4.0/include/vigra/rgbvalue.hxx
1266 --- misc/vigra1.4.0/include/vigra/rgbvalue.hxx 2005-12-21 05:53:43.000000000 +0100
1267 +++ misc/build/vigra1.4.0/include/vigra/rgbvalue.hxx 2006-08-31 12:31:37.392094000 +0200
1269 #ifndef VIGRA_RGBVALUE_HXX
1270 #define VIGRA_RGBVALUE_HXX
1272 +#if defined __GNUC__
1273 +#pragma GCC system_header
1276 #include <cmath> // abs(double)
1277 #include <cstdlib> // abs(int)
1278 #include "vigra/config.hxx"
1279 @@ -700,8 +704,6 @@ operator/=(RGBValue<V, RIDX, GIDX, BIDX>
1283 -using VIGRA_CSTD::abs;
1285 /// component-wise absolute value
1286 template <class T, unsigned int RIDX, unsigned int GIDX, unsigned int BIDX>
1288 diff -uprN misc/vigra1.4.0/include/vigra/separableconvolution.hxx misc/build/vigra1.4.0/include/vigra/separableconvolution.hxx
1289 --- misc/vigra1.4.0/include/vigra/separableconvolution.hxx 2005-12-21 05:53:44.000000000 +0100
1290 +++ misc/build/vigra1.4.0/include/vigra/separableconvolution.hxx 2006-08-31 12:08:15.610465000 +0200
1291 @@ -1017,11 +1017,11 @@ class Kernel1D
1293 InitProxy operator=(value_type const & v)
1295 - int size = right_ - left_ + 1;
1296 + int sz = right_ - left_ + 1;
1297 for(unsigned int i=0; i<kernel_.size(); ++i) kernel_[i] = v;
1298 - norm_ = (double)size*v;
1299 + norm_ = (double)sz*v;
1301 - return InitProxy(kernel_.begin(), size, norm_);
1302 + return InitProxy(kernel_.begin(), sz, norm_);
1306 @@ -1235,17 +1235,17 @@ class Kernel1D
1307 is 1 or equals the size of the kernel.
1310 - Kernel1D & initExplicitly(int left, int right)
1311 + Kernel1D & initExplicitly(int l, int r)
1313 - vigra_precondition(left <= 0,
1314 + vigra_precondition(l <= 0,
1315 "Kernel1D::initExplicitly(): left border must be <= 0.");
1316 - vigra_precondition(right >= 0,
1317 + vigra_precondition(r >= 0,
1318 "Kernel1D::initExplicitly(): right border must be <= 0.");
1325 - kernel_.resize(right - left + 1);
1326 + kernel_.resize(r - l + 1);
1330 @@ -1342,8 +1342,8 @@ class Kernel1D
1333 template <class ARITHTYPE>
1334 -void Kernel1D<ARITHTYPE>::normalize(value_type norm,
1335 - unsigned int derivativeOrder,
1336 +void Kernel1D<ARITHTYPE>::normalize(value_type normFactor,
1337 + unsigned int derivOrder,
1340 typedef typename NumericTraits<value_type>::RealPromote TmpType;
1341 @@ -1352,7 +1352,7 @@ void Kernel1D<ARITHTYPE>::normalize(valu
1342 Iterator k = kernel_.begin();
1343 TmpType sum = NumericTraits<TmpType>::zero();
1345 - if(derivativeOrder == 0)
1346 + if(derivOrder == 0)
1348 for(; k < kernel_.end(); ++k)
1350 @@ -1362,11 +1362,11 @@ void Kernel1D<ARITHTYPE>::normalize(valu
1353 unsigned int faculty = 1;
1354 - for(unsigned int i = 2; i <= derivativeOrder; ++i)
1355 + for(unsigned int i = 2; i <= derivOrder; ++i)
1357 for(double x = left() + offset; k < kernel_.end(); ++x, ++k)
1359 - sum += *k * VIGRA_CSTD::pow(-x, int(derivativeOrder)) / faculty;
1360 + sum += *k * VIGRA_CSTD::pow(-x, (double)derivOrder) / faculty;
1364 @@ -1374,21 +1374,21 @@ void Kernel1D<ARITHTYPE>::normalize(valu
1365 "Kernel1D<ARITHTYPE>::normalize(): "
1366 "Cannot normalize a kernel with sum = 0");
1369 + sum = normFactor / sum;
1370 k = kernel_.begin();
1371 for(; k != kernel_.end(); ++k)
1377 + norm_ = normFactor;
1380 /***********************************************************************/
1382 template <class ARITHTYPE>
1383 void Kernel1D<ARITHTYPE>::initGaussian(double std_dev,
1385 + value_type normFactor)
1387 vigra_precondition(std_dev >= 0.0,
1388 "Kernel1D::initGaussian(): Standard deviation must be >= 0.");
1389 @@ -1421,8 +1421,8 @@ void Kernel1D<ARITHTYPE>::initGaussian(d
1395 + if(normFactor != 0.0)
1396 + normalize(normFactor);
1400 @@ -1434,7 +1434,7 @@ void Kernel1D<ARITHTYPE>::initGaussian(d
1402 template <class ARITHTYPE>
1403 void Kernel1D<ARITHTYPE>::initDiscreteGaussian(double std_dev,
1405 + value_type normFactor)
1407 vigra_precondition(std_dev >= 0.0,
1408 "Kernel1D::initDiscreteGaussian(): Standard deviation must be >= 0.");
1409 @@ -1476,7 +1476,7 @@ void Kernel1D<ARITHTYPE>::initDiscreteGa
1413 - double scale = norm / (2*er - warray[0]);
1414 + double scale = normFactor / (2*er - warray[0]);
1416 initExplicitly(-radius, radius);
1417 iterator c = center();
1418 @@ -1489,12 +1489,12 @@ void Kernel1D<ARITHTYPE>::initDiscreteGa
1421 kernel_.erase(kernel_.begin(), kernel_.end());
1422 - kernel_.push_back(norm);
1423 + kernel_.push_back(normFactor);
1429 + norm_ = normFactor;
1431 // best border treatment for Gaussians is BORDER_TREATMENT_REFLECT
1432 border_treatment_ = BORDER_TREATMENT_REFLECT;
1433 @@ -1505,15 +1505,15 @@ void Kernel1D<ARITHTYPE>::initDiscreteGa
1434 template <class ARITHTYPE>
1436 Kernel1D<ARITHTYPE>::initGaussianDerivative(double std_dev,
1440 + value_type normFactor)
1442 vigra_precondition(order >= 0,
1443 "Kernel1D::initGaussianDerivative(): Order must be >= 0.");
1447 - initGaussian(std_dev, norm);
1448 + initGaussian(std_dev, normFactor);
1452 @@ -1544,7 +1544,7 @@ Kernel1D<ARITHTYPE>::initGaussianDerivat
1454 // remove DC, but only if kernel correction is permitted by a non-zero
1457 + if(normFactor != 0.0)
1459 for(unsigned int i=0; i < kernel_.size(); ++i)
1461 @@ -1555,8 +1555,8 @@ Kernel1D<ARITHTYPE>::initGaussianDerivat
1466 - normalize(norm, order);
1467 + if(normFactor != 0.0)
1468 + normalize(normFactor, order);
1472 @@ -1570,7 +1570,7 @@ Kernel1D<ARITHTYPE>::initGaussianDerivat
1473 template <class ARITHTYPE>
1475 Kernel1D<ARITHTYPE>::initBinomial(int radius,
1477 + value_type normFactor)
1479 vigra_precondition(radius > 0,
1480 "Kernel1D::initBinomial(): Radius must be > 0.");
1481 @@ -1600,12 +1600,12 @@ Kernel1D<ARITHTYPE>::initBinomial(int ra
1483 for(i=0; i<=radius*2+1; ++i)
1485 - kernel_.push_back(kernel[i] * norm);
1486 + kernel_.push_back(kernel[i] * normFactor);
1492 + norm_ = normFactor;
1494 // best border treatment for Binomial is BORDER_TREATMENT_REFLECT
1495 border_treatment_ = BORDER_TREATMENT_REFLECT;
1496 @@ -1615,7 +1615,7 @@ Kernel1D<ARITHTYPE>::initBinomial(int ra
1498 template <class ARITHTYPE>
1499 void Kernel1D<ARITHTYPE>::initAveraging(int radius,
1501 + value_type normFactor)
1503 vigra_precondition(radius > 0,
1504 "Kernel1D::initAveraging(): Radius must be > 0.");
1505 @@ -1629,12 +1629,12 @@ void Kernel1D<ARITHTYPE>::initAveraging(
1507 for(int i=0; i<=radius*2+1; ++i)
1509 - kernel_.push_back(scale * norm);
1510 + kernel_.push_back(scale * normFactor);
1516 + norm_ = normFactor;
1518 // best border treatment for Averaging is BORDER_TREATMENT_CLIP
1519 border_treatment_ = BORDER_TREATMENT_CLIP;
1520 @@ -1644,18 +1644,18 @@ void Kernel1D<ARITHTYPE>::initAveraging(
1522 template <class ARITHTYPE>
1524 -Kernel1D<ARITHTYPE>::initSymmetricGradient(value_type norm)
1525 +Kernel1D<ARITHTYPE>::initSymmetricGradient(value_type normFactor)
1527 kernel_.erase(kernel_.begin(), kernel_.end());
1530 - kernel_.push_back(0.5 * norm);
1531 - kernel_.push_back(0.0 * norm);
1532 - kernel_.push_back(-0.5 * norm);
1533 + kernel_.push_back(0.5 * normFactor);
1534 + kernel_.push_back(0.0 * normFactor);
1535 + kernel_.push_back(-0.5 * normFactor);
1540 + norm_ = normFactor;
1542 // best border treatment for SymmetricGradient is
1543 // BORDER_TREATMENT_REPEAT
1544 diff -uprN misc/vigra1.4.0/include/vigra/sized_int.hxx misc/build/vigra1.4.0/include/vigra/sized_int.hxx
1545 --- misc/vigra1.4.0/include/vigra/sized_int.hxx 2005-12-21 05:53:44.000000000 +0100
1546 +++ misc/build/vigra1.4.0/include/vigra/sized_int.hxx 2006-08-31 12:26:31.937797000 +0200
1547 @@ -73,6 +73,10 @@ struct SelectIntegerType<SIZE, Int_type_
1548 typedef Int_type_not_supported_on_this_platform type;
1551 +#if defined __SUNPRO_CC
1552 +#pragma disable_warn
1555 template<class LIST>
1556 struct SelectBiggestIntegerType
1558 @@ -86,6 +90,10 @@ struct SelectBiggestIntegerType
1562 +#if defined __SUNPRO_CC
1563 +#pragma enable_warn
1567 struct SelectBiggestIntegerType<Int_type_not_supported_on_this_platform>
1569 diff -uprN misc/vigra1.4.0/include/vigra/splines.hxx misc/build/vigra1.4.0/include/vigra/splines.hxx
1570 --- misc/vigra1.4.0/include/vigra/splines.hxx 2005-12-21 05:53:44.000000000 +0100
1571 +++ misc/build/vigra1.4.0/include/vigra/splines.hxx 2006-08-31 12:08:15.655906000 +0200
1572 @@ -108,8 +108,8 @@ class BSplineBase
1573 /** Create functor for gevine derivative of the spline. The spline's order
1574 is specified spline by the template argument <TT>ORDER</tt>.
1576 - explicit BSplineBase(unsigned int derivativeOrder = 0)
1577 - : s1_(derivativeOrder)
1578 + explicit BSplineBase(unsigned int derivOrder = 0)
1582 /** Unary function call.
1583 @@ -280,8 +280,8 @@ class BSplineBase<0, T>
1584 typedef T result_type;
1585 enum StaticOrder { order = 0 };
1587 - explicit BSplineBase(unsigned int derivativeOrder = 0)
1588 - : derivativeOrder_(derivativeOrder)
1589 + explicit BSplineBase(unsigned int derivOrder = 0)
1590 + : derivativeOrder_(derivOrder)
1593 result_type operator()(argument_type x) const
1594 @@ -357,8 +357,8 @@ class BSpline<1, T>
1595 typedef T result_type;
1596 enum StaticOrder { order = 1 };
1598 - explicit BSpline(unsigned int derivativeOrder = 0)
1599 - : derivativeOrder_(derivativeOrder)
1600 + explicit BSpline(unsigned int derivOrder = 0)
1601 + : derivativeOrder_(derivOrder)
1604 result_type operator()(argument_type x) const
1605 @@ -454,8 +454,8 @@ class BSpline<2, T>
1606 typedef T result_type;
1607 enum StaticOrder { order = 2 };
1609 - explicit BSpline(unsigned int derivativeOrder = 0)
1610 - : derivativeOrder_(derivativeOrder)
1611 + explicit BSpline(unsigned int derivOrder = 0)
1612 + : derivativeOrder_(derivOrder)
1615 result_type operator()(argument_type x) const
1616 @@ -580,8 +580,8 @@ class BSpline<3, T>
1617 typedef T result_type;
1618 enum StaticOrder { order = 3 };
1620 - explicit BSpline(unsigned int derivativeOrder = 0)
1621 - : derivativeOrder_(derivativeOrder)
1622 + explicit BSpline(unsigned int derivOrder = 0)
1623 + : derivativeOrder_(derivOrder)
1626 result_type operator()(argument_type x) const
1627 @@ -732,8 +732,8 @@ class BSpline<5, T>
1628 typedef T result_type;
1629 enum StaticOrder { order = 5 };
1631 - explicit BSpline(unsigned int derivativeOrder = 0)
1632 - : derivativeOrder_(derivativeOrder)
1633 + explicit BSpline(unsigned int derivOrder = 0)
1634 + : derivativeOrder_(derivOrder)
1637 result_type operator()(argument_type x) const
1638 diff -uprN misc/vigra1.4.0/include/vigra/static_assert.hxx misc/build/vigra1.4.0/include/vigra/static_assert.hxx
1639 --- misc/vigra1.4.0/include/vigra/static_assert.hxx 2005-12-21 05:53:45.000000000 +0100
1640 +++ misc/build/vigra1.4.0/include/vigra/static_assert.hxx 2006-08-31 12:08:15.677548000 +0200
1641 @@ -115,7 +115,7 @@ assertImpl( void (*)(Predicate), typenam
1643 TODO: provide more assertion base classes for other (non boolean) types of tests
1645 -#if !defined(__GNUC__) || __GNUC__ > 2
1646 +#if (!defined(__GNUC__) || __GNUC__ > 2) && (!defined(__SUNPRO_CC) || __SUNPRO_CC > 0x550)
1647 #define VIGRA_STATIC_ASSERT(Predicate) \
1649 VIGRA_PREPROCESSOR_CONCATENATE(vigra_assertion_in_line_, __LINE__) = sizeof( \
1650 diff -uprN misc/vigra1.4.0/include/vigra/tinyvector.hxx misc/build/vigra1.4.0/include/vigra/tinyvector.hxx
1651 --- misc/vigra1.4.0/include/vigra/tinyvector.hxx 2005-12-21 05:53:46.000000000 +0100
1652 +++ misc/build/vigra1.4.0/include/vigra/tinyvector.hxx 2006-08-31 12:31:25.140791000 +0200
1654 #ifndef VIGRA_TINYVECTOR_HXX
1655 #define VIGRA_TINYVECTOR_HXX
1657 +#if defined __GNUC__
1658 +#pragma GCC system_header
1661 #include <cmath> // abs(double)
1662 #include <cstdlib> // abs(int)
1663 #include <iosfwd> // ostream
1668 -using VIGRA_CSTD::abs;
1669 using VIGRA_CSTD::ceil;
1670 using VIGRA_CSTD::floor;
1672 @@ -439,9 +442,9 @@ class TinyVectorBase
1673 /** Initialize from another sequence (must have length SIZE!)
1675 template <class Iterator>
1676 - void init(Iterator i, Iterator end)
1677 + void init(Iterator i, Iterator iend)
1679 - vigra_precondition(end-i == SIZE,
1680 + vigra_precondition(iend-i == SIZE,
1681 "TinyVector::init(): Sequence has wrong size.");
1682 Loop::assignCast(data_, i);
1684 diff -uprN misc/vigra1.4.0/include/vigra/transformimage.hxx misc/build/vigra1.4.0/include/vigra/transformimage.hxx
1685 --- misc/vigra1.4.0/include/vigra/transformimage.hxx 2005-12-21 05:53:46.000000000 +0100
1686 +++ misc/build/vigra1.4.0/include/vigra/transformimage.hxx 2006-08-31 12:08:15.727415000 +0200
1687 @@ -986,11 +986,11 @@ class BrightnessContrastFunctor
1688 result_type operator()(argument_type const & v) const
1690 promote_type v1 = (v - min_) / diff_;
1691 - promote_type brighter = pow(v1, b_);
1692 + promote_type brighter = pow((promote_type)v1, b_);
1693 promote_type v2 = 2.0 * brighter - one_;
1694 promote_type contrasted = (v2 < zero_) ?
1697 + -pow((promote_type)-v2, c_) :
1698 + pow((promote_type)v2, c_);
1699 return result_type(0.5 * diff_ * (contrasted + one_) + min_);