/**
* @file
* @brief Bernstein-Bezier polynomial
*//*
* Authors:
* MenTaLguY <mental@rydia.net>
* Michael Sloan <mgsloan@gmail.com>
* Nathan Hurst <njh@njhurst.com>
* Krzysztof KosiĆski <tweenk.pl@gmail.com>
*
* Copyright 2007-2015 Authors
*
* 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, write 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.
*
*/
namespace Geom {
/* This is inelegant, as it uses several extra stores. I think there might be a way to
* evaluate roughly in situ. */
// initialize return vector with zeroes, such that we only need to replace the non-zero derivs
// initialize temp storage variables
for(unsigned i = 0; i < size(); i++) {
}
}
//val_n_der[di] = (casteljau_subdivision(t, &d_[0], NULL, NULL, order() - di));
}
}
return val_n_der;
}
{
if (left) {
if (right) {
} else {
}
} else if (right) {
}
}
{
return ret;
}
{
return solutions;
}
{
find_bernstein_roots(&const_cast<std::valarray<Coord>&>(c_)[0], order(), solutions, 0, ivl.min(), ivl.max());
return solutions;
}
{
for(unsigned i = 0; i < n; i++) {
fd[i] = 0;
for(unsigned j = i; j < n; j++) {
}
}
return fd;
}
{
unsigned n = size();
for(unsigned i = 1; i < n; i++) {
}
return ed;
}
{
if(order() == 0) return *this;
unsigned n = size();
for(unsigned i = 1; i < middle; i++) {
}
for(unsigned i = n-1; i >= middle; i--) {
}
return ed;
}
{
}
return ed;
}
{
if(order() == 0) return *this;
unsigned n = order();
for(unsigned i = 0; i < n; i++) {
}
return b;
}
{
bezier_to_sbasis(sb, (*this));
return sb;
//return bezier_to_sbasis(&c_[0], order());
}
{
} else {
}
return *this;
}
{
} else {
}
return *this;
}
{
unsigned m = f.order();
unsigned n = g.order();
// h_k = sum_(i+j=k) (m i)f_i (n j)g_j / (m+n k)
for(unsigned i = 0; i <= m; i++) {
for(unsigned j = 0; j <= n; j++) {
}
}
for(unsigned k = 0; k <= m+n; k++) {
}
return h;
}
{
bool reverse_result = false;
reverse_result = true;
}
do {
if (from == 0) {
if (to == 1) {
break;
}
break;
}
if (to == 1) break;
// to protect against numerical inaccuracy in the above expression, we manually set
// the last coefficient to a value evaluated directly from the original polynomial
} while(0);
if (reverse_result) {
}
return ret;
}
{
//if(a.order() == 1) return Bezier(0.0);
for(unsigned i = 0; i < a.order(); i++) {
}
return der;
}
{
inte[0] = 0;
}
return inte;
}
{
return ret;
}
{
for (unsigned i = 0; i < r.size(); ++i) {
}
return ret;
}
{
//return bounds_local(b.toSBasis(), i);
if (i) {
} else {
return OptInterval();
}
}
} // end 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 :