/*
* piecewise.cpp - Piecewise function class
*
* Copyright 2007 Michael Sloan <mgsloan@gmail.com>
* Copyright 2007 JF Barraud
*
* modify it either under the terms of the GNU Lesser General Public
* License version 2.1 as published by the Free Software Foundation
* (the "LGPL") or, at your option, under the terms of the Mozilla
* Public License Version 1.1 (the "MPL"). If you do not alter this
* notice, a recipient may use your version of this file under either
* the MPL or the LGPL.
*
* You should have received a copy of the LGPL along with this library
* in the file COPYING-LGPL-2.1; if not, output to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* You should have received a copy of the MPL along with this library
* in the file COPYING-MPL-1.1
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
* OF ANY KIND, either express or implied. See the LGPL or the MPL for
* the specific language governing rights and limitations.
*
*/
#include <iterator>
#include <map>
namespace Geom {
return ret;
}
divide(Piecewise<SBasis> const &a, Piecewise<SBasis> const &b, double tol, unsigned k, double zero) {
}
return ret;
}
Piecewise<SBasis> divide(Piecewise<SBasis> const &a, SBasis const &b, double tol, unsigned k, double zero){
}
Piecewise<SBasis> divide(SBasis const &a, Piecewise<SBasis> const &b, double tol, unsigned k, double zero){
}
//TODO: have a better look at sgn(b).
}
SBasis c,r=a;
//TODO: what is a good relative tol? atm, c=a/b +/- (tol/a)%...
k+=1;
//assert(b.at0()!=0 && b.at1()!=0);
for (unsigned i=0; i<k; i++){
c[i]=ci;
}
}
return c0;
}
//-- compose(pw<T>,SBasis) ---------------
/*
the purpose of the following functions is only to reduce the code in piecewise.h
TODO: use a vector<pairs<double,unsigned> > instead of a map<double,unsigned>.
*/
}
}
// Also map 0 and 1 to the first value above(or =) g(0) and g(1).
unsigned i=0;
result[0.]=i;
}
unsigned i=0;
result[1.]=i;
}
return(result);
}
SBasis const &g){
} else { //g([t0,t1]) is contained in level idx0!...
}
//move idx back from levels f.cuts
idx+=1;
return idx;
}
Piecewise<SBasis> pw_compose_inverse(SBasis const &f, SBasis const &g, unsigned order, double zero){
//OptInterval g_range = bounds_exact(g);
if ( flip ){
g01 *= -1.;
g01 += 1.;
}
#if 1
//g[0][0] = 0.;
//g[0][1] = 1.;
#endif
}else{
}
if (flip) {
}
return result;
}
for (unsigned i=0; i<f.size(); i++){
}
}
return result;
}
std::vector<std::vector<double> > multi_roots(Piecewise<SBasis> const &f, std::vector<double> const &values) {
for (unsigned i=0; i<f.size(); i++) {
}
}
}
return result;
}
for (unsigned i=0; i<f.size(); i++){
//Interval domj( f.mapToDomain(resulti[j].min(), i ), f.mapToDomain(resulti[j].max(), i ) );
}else{
}
}
}
return result;
}
}
}
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :