diff --git a/NewKernel_d/include/CGAL/Kernel_d/Coaffine.h b/NewKernel_d/include/CGAL/Kernel_d/Coaffine.h new file mode 100644 index 00000000000..2a95a7fb304 --- /dev/null +++ b/NewKernel_d/include/CGAL/Kernel_d/Coaffine.h @@ -0,0 +1,68 @@ +#ifndef CGAL_KD_COAFFINE_H +#define CGAL_KD_COAFFINE_H +#include +// DRAFT, DOESN'T WORK YET +namespace CGAL { +struct Orientation_in_subspace { + std::vector indices; + // use indices.size() to know if the origin is added + // an index of i means add the vector (0,...,1,...,0) with the 1 in i-th position + // *OR* it means *don't* add this one... +}; + +template struct Construct_orientation_in_subspace : private Store_kernel { + CGAL_FUNCTOR_INIT_STORE(Construct_orientation_in_subspace) + typedef R_ R; + typedef typename R_::FT FT; + typedef typename R::template Type::type Point; + typedef typename R::template Functor::type CCC; + typedef typename R::LA LA; + typedef typename LA::template Matrix::type Matrix; + typedef typename R::template Functor::type PD; + typedef Orientation_in_subspace result_type; + + // This implementation is going to suck. Maybe we should push the + // functionality into LA. + template + result_type operator()(Iter f, Iter e)const{ + PD pd (this->kernel()); + CCC ccc (this->kernel()); + int dim = pd(*f); + Matrix coord (dim, dim); + int col = 0; + std::vector proj; + std::vector rest; rest.reserve(dim); + for(int i=0; i::iterator it=rest.begin();it!=rest.end();++it) { + for(int i=0; i }; -template +template inline transforming_iterator make_transforming_iterator(Iter i, F const&f=F()) { return transforming_iterator(i,f); } diff --git a/NewKernel_d/include/CGAL/transforming_pair_iterator.h b/NewKernel_d/include/CGAL/transforming_pair_iterator.h index 72e6f6ac170..9df4b61c4e9 100644 --- a/NewKernel_d/include/CGAL/transforming_pair_iterator.h +++ b/NewKernel_d/include/CGAL/transforming_pair_iterator.h @@ -97,7 +97,7 @@ private internal::Functor_as_base }; -template +template inline transforming_pair_iterator make_transforming_pair_iterator(It1 i1, It2 i2, F const&f=F()) { return transforming_pair_iterator(i1,i2,f); }