d2-sbasis.cpp revision 057b711bd304ee2f2e982527fa4f92146f707420
/* One would think that we would include d2-sbasis.h, however,
* you cannot actually include it in anything - only d2 may import it.
* This is due to the trickinesses of template submatching. */
namespace Geom {
}
}
}
}
//TODO: Is this sensical? shouldn't it be like pythagorean or something?
}
for(unsigned i = 0; i < x.size(); i++)
return ret;
}
for(unsigned d = 0; d < 2; d++) {
for(unsigned i = 0; i < a.size(); i++)
}
return ret;
}
if (M.empty()) return M;
for (unsigned i=0; i<M.size(); i++){
}
return result;
}
/** @brief Calculates the 'dot product' or 'inner product' of \c a and \c b
* @return \f[
* f(t) \rightarrow \left\{
* \begin{array}{c}
* a_1 \bullet b_1 \\
* a_2 \bullet b_2 \\
* \ldots \\
* a_n \bullet b_n \\
* \end{array}\right.
* \f]
* @relates Piecewise */
{
}
return result;
}
/** @brief Calculates the 'dot product' or 'inner product' of \c a and \c b
* @return \f[
* f(t) \rightarrow \left\{
* \begin{array}{c}
* a_1 \bullet b \\
* a_2 \bullet b \\
* \ldots \\
* a_n \bullet b \\
* \end{array}\right.
* \f]
* @relates Piecewise */
{
for (unsigned i = 0; i < a.size(); ++i){
}
return result;
}
for (unsigned i=0; i<a.size(); i++){
}
return result;
}
for (unsigned i = 0; i < a.size(); i++) {
}
return result;
}
//if tol>0, only force continuity where the jump is smaller than tol.
{
if (f.size()==0) return f;
} else {
prev_sb[0][1] = c;
}
} else {
cur_sb[0][0] = c;
}
}
}
}
return result;
}
{
using namespace Geom;
unsigned piece_start = 0;
for (unsigned j = piece_start; j<i+1; j++){
}
piece_start = i+1;
}
}
return ret;
}
{
// length of derivative is non-zero, so return unit vector
}
}
return Point (0,0);
}
if ( f.empty() ){
return;
}
}else{
}
}
}
if ( f.empty() ){
return;
}
}else{
}
}
}
std::vector<Piecewise<D2<SBasis> > > fuse_nearby_ends(std::vector<Piecewise<D2<SBasis> > > const &f, double tol){
if ( f.empty()) return f;
for (unsigned i=0; i<f.size(); i++){
bool inserted = false;
Point a = f[i].firstValue();
for (unsigned j=0; j<pre_result.size(); j++){
pre_result[j].push_back(i);
inserted = true;
break;
}
inserted = true;
break;
}
}
if (!inserted) {
}
}
for (unsigned i=0; i<pre_result.size(); i++){
for (unsigned j=0; j<pre_result[i].size(); j++){
if ( j>0 ){
}
}
//TODO: check sizes!!!
}
}
return result;
}
/*
* Computes the intersection of two sets given as (ordered) union of intervals.
*/
static std::vector<Interval> intersect( std::vector<Interval> const &a, std::vector<Interval> const &b){
//TODO: use order!
for (unsigned i=0; i < a.size(); i++){
for (unsigned j=0; j < b.size(); j++){
OptInterval c( a[i] );
c &= b[j];
if ( c ) {
}
}
}
return result;
}
}
}
}
}
return result;
}
std::vector<std::vector<Interval> > level_sets( D2<SBasis> const &f, std::vector<Point> pts, double tol){
}
return level_sets( f, regions );
}
} // namespace Geom
/*
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 :