mirror of https://github.com/CGAL/cgal
Merge branch 'cgal/releases/CGAL-4.14-branch'
whitespace+tab removal, merged with option -Xignore-all-space
This commit is contained in:
commit
0a46621dc6
|
|
@ -39,7 +39,7 @@ void naive_test(int k, const char* fname,
|
|||
CGAL::Aff_transformation_3<K> init2(CGAL::TRANSLATION, - K::Vector_3(
|
||||
(box.xmax()-box.xmin()),0,0));
|
||||
PMP::transform(init2, tm2);
|
||||
|
||||
|
||||
tmTree.build();
|
||||
K::Vector_3 unit_vec = (2.0/k * K::Vector_3((box.xmax()-box.xmin()),
|
||||
0,
|
||||
|
|
@ -56,9 +56,9 @@ void naive_test(int k, const char* fname,
|
|||
rot[7] = std::sin(CGAL_PI/4.0);
|
||||
rot[8] = std::cos(CGAL_PI/4.0);
|
||||
CGAL::Aff_transformation_3<K> R(rot[0], rot[1], rot[2],
|
||||
rot[3], rot[4], rot[5],
|
||||
rot[3], rot[4], rot[5],
|
||||
rot[6], rot[7], rot[8]);
|
||||
|
||||
|
||||
CGAL::Side_of_triangle_mesh<Surface_mesh, K> sotm1(tm);
|
||||
for(int i=1; i<k+1; ++i)
|
||||
{
|
||||
|
|
@ -68,10 +68,10 @@ void naive_test(int k, const char* fname,
|
|||
tmTree2.build();
|
||||
if(tmTree2.do_intersect(tmTree))
|
||||
++nb_inter;
|
||||
else
|
||||
else
|
||||
{
|
||||
if(sotm1(tm2.point(*tm2.vertices().begin())) != CGAL::ON_UNBOUNDED_SIDE)
|
||||
{
|
||||
{
|
||||
++nb_include;
|
||||
}
|
||||
else
|
||||
|
|
@ -101,16 +101,16 @@ void test_no_collision(int k, const char* fname,
|
|||
CGAL::Aff_transformation_3<K> init2(CGAL::TRANSLATION, - K::Vector_3(
|
||||
(box.xmax()-box.xmin()),0,0));
|
||||
PMP::transform(init2, tm2);
|
||||
|
||||
|
||||
tmTree.build();
|
||||
tmTree2.build();
|
||||
typedef boost::property_map<Surface_mesh, CGAL::vertex_point_t>::type VPM;
|
||||
VPM vpm2 = get(CGAL::vertex_point, tm2);
|
||||
|
||||
|
||||
K::Vector_3 unit_vec = (2.0/k * K::Vector_3((box.xmax()-box.xmin()),
|
||||
0,
|
||||
0));
|
||||
|
||||
|
||||
CGAL::Side_of_triangle_mesh<Surface_mesh, K,
|
||||
VPM, Tree> sotm1(tmTree);
|
||||
for(int i=1; i<k+1; ++i)
|
||||
|
|
@ -126,7 +126,7 @@ void test_no_collision(int k, const char* fname,
|
|||
rot[7] = std::sin(i*CGAL_PI/4.0);
|
||||
rot[8] = std::cos(i*CGAL_PI/4.0);
|
||||
CGAL::Aff_transformation_3<K> R(rot[0], rot[1], rot[2],
|
||||
rot[3], rot[4], rot[5],
|
||||
rot[3], rot[4], rot[5],
|
||||
rot[6], rot[7], rot[8]);
|
||||
CGAL::Aff_transformation_3<K> T1 = CGAL::Aff_transformation_3<K>(CGAL::TRANSLATION, i*unit_vec);
|
||||
CGAL::Aff_transformation_3<K> transfo = R*T1;
|
||||
|
|
@ -134,10 +134,10 @@ void test_no_collision(int k, const char* fname,
|
|||
CGAL::Interval_nt_advanced::Protector protector;
|
||||
if(tmTree2.do_intersect(tmTree))
|
||||
++nb_inter;
|
||||
else
|
||||
else
|
||||
{
|
||||
if(sotm1(transfo.transform(vpm2[*tm2.vertices().begin()])) != CGAL::ON_UNBOUNDED_SIDE)
|
||||
{
|
||||
{
|
||||
++nb_include;
|
||||
}
|
||||
else
|
||||
|
|
@ -158,7 +158,7 @@ int main(int argc, const char** argv)
|
|||
int k = (argc>1) ? atoi(argv[1]) : 10;
|
||||
const char* path = (argc>2)?argv[2]:"data/handle"
|
||||
".off";
|
||||
|
||||
|
||||
std::cout<< k<<" steps in "<<path<<std::endl;
|
||||
int nb_inter(0), nb_no_inter(0), nb_include(0),
|
||||
naive_inter(0), naive_no_inter(0), naive_include(0);
|
||||
|
|
|
|||
|
|
@ -4,103 +4,103 @@
|
|||
class Color_ramp
|
||||
{
|
||||
private :
|
||||
int m_nodes[256];
|
||||
unsigned char m_colors[4][256];
|
||||
int m_nodes[256];
|
||||
unsigned char m_colors[4][256];
|
||||
|
||||
public :
|
||||
Color_ramp()
|
||||
{
|
||||
build_thermal();
|
||||
}
|
||||
~Color_ramp() {}
|
||||
Color_ramp()
|
||||
{
|
||||
build_thermal();
|
||||
}
|
||||
~Color_ramp() {}
|
||||
|
||||
public :
|
||||
unsigned char r(unsigned int index) const { return m_colors[0][index%256]; }
|
||||
unsigned char g(unsigned int index) const { return m_colors[1][index%256]; }
|
||||
unsigned char b(unsigned int index) const { return m_colors[2][index%256]; }
|
||||
unsigned char r(unsigned int index) const { return m_colors[0][index%256]; }
|
||||
unsigned char g(unsigned int index) const { return m_colors[1][index%256]; }
|
||||
unsigned char b(unsigned int index) const { return m_colors[2][index%256]; }
|
||||
|
||||
private:
|
||||
|
||||
void rebuild()
|
||||
{
|
||||
// build nodes
|
||||
m_colors[3][0] = 1;
|
||||
m_colors[3][255] = 1;
|
||||
unsigned int nb_nodes = 0;
|
||||
for(int i=0;i<256;i++)
|
||||
{
|
||||
if(m_colors[3][i])
|
||||
{
|
||||
m_nodes[nb_nodes] = i;
|
||||
nb_nodes++;
|
||||
}
|
||||
}
|
||||
void rebuild()
|
||||
{
|
||||
// build nodes
|
||||
m_colors[3][0] = 1;
|
||||
m_colors[3][255] = 1;
|
||||
unsigned int nb_nodes = 0;
|
||||
for(int i=0;i<256;i++)
|
||||
{
|
||||
if(m_colors[3][i])
|
||||
{
|
||||
m_nodes[nb_nodes] = i;
|
||||
nb_nodes++;
|
||||
}
|
||||
}
|
||||
|
||||
// build color_ramp
|
||||
for(int k=0;k<3;k++)
|
||||
for(unsigned int i=0;i<(nb_nodes-1);i++)
|
||||
{
|
||||
int x1 = m_nodes[i];
|
||||
int x2 = m_nodes[i+1];
|
||||
int y1 = m_colors[k][x1];
|
||||
int y2 = m_colors[k][x2];
|
||||
float a = (float)(y2-y1) / (float)(x2-x1);
|
||||
float b = (float)y1 - a*(float)x1;
|
||||
for(int j=x1;j<x2;j++)
|
||||
m_colors[k][j] = (unsigned char)(a*(float)j+b);
|
||||
}
|
||||
}
|
||||
// build color_ramp
|
||||
for(int k=0;k<3;k++)
|
||||
for(unsigned int i=0;i<(nb_nodes-1);i++)
|
||||
{
|
||||
int x1 = m_nodes[i];
|
||||
int x2 = m_nodes[i+1];
|
||||
int y1 = m_colors[k][x1];
|
||||
int y2 = m_colors[k][x2];
|
||||
float a = (float)(y2-y1) / (float)(x2-x1);
|
||||
float b = (float)y1 - a*(float)x1;
|
||||
for(int j=x1;j<x2;j++)
|
||||
m_colors[k][j] = (unsigned char)(a*(float)j+b);
|
||||
}
|
||||
}
|
||||
|
||||
void reset()
|
||||
{
|
||||
for(int i=1;i<=254;i++)
|
||||
m_colors[3][i] = 0;
|
||||
m_colors[3][0] = 1;
|
||||
m_colors[3][255] = 1;
|
||||
}
|
||||
void reset()
|
||||
{
|
||||
for(int i=1;i<=254;i++)
|
||||
m_colors[3][i] = 0;
|
||||
m_colors[3][0] = 1;
|
||||
m_colors[3][255] = 1;
|
||||
}
|
||||
|
||||
public:
|
||||
void add_node(unsigned int index,
|
||||
unsigned char r,
|
||||
unsigned char g,
|
||||
unsigned char b)
|
||||
{
|
||||
m_colors[3][index] = 1;
|
||||
m_colors[0][index] = r;
|
||||
m_colors[1][index] = g;
|
||||
m_colors[2][index] = b;
|
||||
}
|
||||
void add_node(unsigned int index,
|
||||
unsigned char r,
|
||||
unsigned char g,
|
||||
unsigned char b)
|
||||
{
|
||||
m_colors[3][index] = 1;
|
||||
m_colors[0][index] = r;
|
||||
m_colors[1][index] = g;
|
||||
m_colors[2][index] = b;
|
||||
}
|
||||
|
||||
void build_red()
|
||||
{
|
||||
reset();
|
||||
m_colors[3][0] = 1;m_colors[0][0] = 128;m_colors[1][0] = 0;m_colors[2][0] = 0;
|
||||
m_colors[3][80] = 1;m_colors[0][80] = 255;m_colors[1][80] = 0;m_colors[2][80] = 0;
|
||||
m_colors[3][160] = 1;m_colors[0][160] = 255;m_colors[1][160] = 128;m_colors[2][160] = 0;
|
||||
m_colors[3][255] = 1;m_colors[0][255] = 255;m_colors[1][255] = 255;m_colors[2][255] = 255;
|
||||
rebuild();
|
||||
}
|
||||
void build_red()
|
||||
{
|
||||
reset();
|
||||
m_colors[3][0] = 1;m_colors[0][0] = 128;m_colors[1][0] = 0;m_colors[2][0] = 0;
|
||||
m_colors[3][80] = 1;m_colors[0][80] = 255;m_colors[1][80] = 0;m_colors[2][80] = 0;
|
||||
m_colors[3][160] = 1;m_colors[0][160] = 255;m_colors[1][160] = 128;m_colors[2][160] = 0;
|
||||
m_colors[3][255] = 1;m_colors[0][255] = 255;m_colors[1][255] = 255;m_colors[2][255] = 255;
|
||||
rebuild();
|
||||
}
|
||||
|
||||
void build_thermal()
|
||||
{
|
||||
reset();
|
||||
m_colors[3][0] = 1;m_colors[0][0] = 0;m_colors[1][0] = 0;m_colors[2][0] = 0;
|
||||
m_colors[3][70] = 1;m_colors[0][70] = 128;m_colors[1][70] = 0;m_colors[2][70] = 0;
|
||||
m_colors[3][165] = 1;m_colors[0][165] = 255;m_colors[1][165] = 128;m_colors[2][165] = 0;
|
||||
m_colors[3][240] = 1;m_colors[0][240] = 255;m_colors[1][240] = 191;m_colors[2][240] = 128;
|
||||
m_colors[3][255] = 1;m_colors[0][255] = 255;m_colors[1][255] = 255;m_colors[2][255] = 255;
|
||||
rebuild();
|
||||
}
|
||||
void build_thermal()
|
||||
{
|
||||
reset();
|
||||
m_colors[3][0] = 1;m_colors[0][0] = 0;m_colors[1][0] = 0;m_colors[2][0] = 0;
|
||||
m_colors[3][70] = 1;m_colors[0][70] = 128;m_colors[1][70] = 0;m_colors[2][70] = 0;
|
||||
m_colors[3][165] = 1;m_colors[0][165] = 255;m_colors[1][165] = 128;m_colors[2][165] = 0;
|
||||
m_colors[3][240] = 1;m_colors[0][240] = 255;m_colors[1][240] = 191;m_colors[2][240] = 128;
|
||||
m_colors[3][255] = 1;m_colors[0][255] = 255;m_colors[1][255] = 255;m_colors[2][255] = 255;
|
||||
rebuild();
|
||||
}
|
||||
|
||||
void build_blue()
|
||||
{
|
||||
reset();
|
||||
m_colors[3][0] = 1;m_colors[0][0] = 0;m_colors[1][0] = 0;m_colors[2][0] = 128;
|
||||
m_colors[3][80] = 1;m_colors[0][80] = 0;m_colors[1][80] = 0;m_colors[2][80] = 255;
|
||||
m_colors[3][160] = 1;m_colors[0][160] = 0;m_colors[1][160] = 255;m_colors[2][160] = 255;
|
||||
m_colors[3][255] = 1;m_colors[0][255] = 255;m_colors[1][255] = 255;m_colors[2][255] = 255;
|
||||
rebuild();
|
||||
}
|
||||
void build_blue()
|
||||
{
|
||||
reset();
|
||||
m_colors[3][0] = 1;m_colors[0][0] = 0;m_colors[1][0] = 0;m_colors[2][0] = 128;
|
||||
m_colors[3][80] = 1;m_colors[0][80] = 0;m_colors[1][80] = 0;m_colors[2][80] = 255;
|
||||
m_colors[3][160] = 1;m_colors[0][160] = 0;m_colors[1][160] = 255;m_colors[2][160] = 255;
|
||||
m_colors[3][255] = 1;m_colors[0][255] = 255;m_colors[1][255] = 255;m_colors[2][255] = 255;
|
||||
rebuild();
|
||||
}
|
||||
};
|
||||
|
||||
#endif // _COLOR_RAMP_H
|
||||
|
|
|
|||
|
|
@ -16,288 +16,288 @@
|
|||
MainWindow::MainWindow(QWidget* parent)
|
||||
: CGAL::Qt::DemosMainWindow(parent)
|
||||
{
|
||||
ui = new Ui::MainWindow;
|
||||
ui->setupUi(this);
|
||||
ui = new Ui::MainWindow;
|
||||
ui->setupUi(this);
|
||||
|
||||
// saves some pointers from ui, for latter use.
|
||||
m_pViewer = ui->viewer;
|
||||
// saves some pointers from ui, for latter use.
|
||||
m_pViewer = ui->viewer;
|
||||
|
||||
// does not save the state of the viewer
|
||||
m_pViewer->setStateFileName(QString());
|
||||
// does not save the state of the viewer
|
||||
m_pViewer->setStateFileName(QString());
|
||||
|
||||
// accepts drop events
|
||||
setAcceptDrops(true);
|
||||
// setups scene
|
||||
// accepts drop events
|
||||
setAcceptDrops(true);
|
||||
// setups scene
|
||||
m_pScene = new Scene();
|
||||
m_pViewer->setScene(m_pScene);
|
||||
m_pViewer->setScene(m_pScene);
|
||||
m_pViewer->setManipulatedFrame(m_pScene->manipulatedFrame());
|
||||
|
||||
// connects actionQuit (Ctrl+Q) and qApp->quit()
|
||||
connect(ui->actionQuit, SIGNAL(triggered()),
|
||||
this, SLOT(quit()));
|
||||
// connects actionQuit (Ctrl+Q) and qApp->quit()
|
||||
connect(ui->actionQuit, SIGNAL(triggered()),
|
||||
this, SLOT(quit()));
|
||||
|
||||
this->addRecentFiles(ui->menuFile, ui->actionQuit);
|
||||
connect(this, SIGNAL(openRecentFile(QString)),
|
||||
this, SLOT(open(QString)));
|
||||
this->addRecentFiles(ui->menuFile, ui->actionQuit);
|
||||
connect(this, SIGNAL(openRecentFile(QString)),
|
||||
this, SLOT(open(QString)));
|
||||
|
||||
readSettings();
|
||||
readSettings();
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete ui;
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void MainWindow::dragEnterEvent(QDragEnterEvent *event)
|
||||
{
|
||||
if (event->mimeData()->hasFormat("text/uri-list"))
|
||||
event->acceptProposedAction();
|
||||
if (event->mimeData()->hasFormat("text/uri-list"))
|
||||
event->acceptProposedAction();
|
||||
}
|
||||
|
||||
void MainWindow::dropEvent(QDropEvent *event)
|
||||
{
|
||||
Q_FOREACH(QUrl url, event->mimeData()->urls()) {
|
||||
QString filename = url.toLocalFile();
|
||||
if(!filename.isEmpty()) {
|
||||
QTextStream(stderr) << QString("dropEvent(\"%1\")\n").arg(filename);
|
||||
open(filename);
|
||||
}
|
||||
}
|
||||
event->acceptProposedAction();
|
||||
Q_FOREACH(QUrl url, event->mimeData()->urls()) {
|
||||
QString filename = url.toLocalFile();
|
||||
if(!filename.isEmpty()) {
|
||||
QTextStream(stderr) << QString("dropEvent(\"%1\")\n").arg(filename);
|
||||
open(filename);
|
||||
}
|
||||
}
|
||||
event->acceptProposedAction();
|
||||
}
|
||||
|
||||
void MainWindow::updateViewerBBox()
|
||||
{
|
||||
m_pScene->update_bbox();
|
||||
const Scene::Bbox bbox = m_pScene->bbox();
|
||||
const double xmin = bbox.xmin();
|
||||
const double ymin = bbox.ymin();
|
||||
const double zmin = bbox.zmin();
|
||||
const double xmax = bbox.xmax();
|
||||
const double ymax = bbox.ymax();
|
||||
const double zmax = bbox.zmax();
|
||||
CGAL::qglviewer::Vec
|
||||
vec_min(xmin, ymin, zmin),
|
||||
vec_max(xmax, ymax, zmax);
|
||||
m_pViewer->setSceneBoundingBox(vec_min,vec_max);
|
||||
m_pViewer->camera()->showEntireScene();
|
||||
m_pScene->update_bbox();
|
||||
const Scene::Bbox bbox = m_pScene->bbox();
|
||||
const double xmin = bbox.xmin();
|
||||
const double ymin = bbox.ymin();
|
||||
const double zmin = bbox.zmin();
|
||||
const double xmax = bbox.xmax();
|
||||
const double ymax = bbox.ymax();
|
||||
const double zmax = bbox.zmax();
|
||||
CGAL::qglviewer::Vec
|
||||
vec_min(xmin, ymin, zmin),
|
||||
vec_max(xmax, ymax, zmax);
|
||||
m_pViewer->setSceneBoundingBox(vec_min,vec_max);
|
||||
m_pViewer->camera()->showEntireScene();
|
||||
}
|
||||
|
||||
void MainWindow::open(QString filename)
|
||||
{
|
||||
QFileInfo fileinfo(filename);
|
||||
if(fileinfo.isFile() && fileinfo.isReadable())
|
||||
{
|
||||
int index = m_pScene->open(filename);
|
||||
if(index >= 0)
|
||||
{
|
||||
QSettings settings;
|
||||
settings.setValue("OFF open directory",
|
||||
fileinfo.absoluteDir().absolutePath());
|
||||
this->addToRecentFiles(filename);
|
||||
QFileInfo fileinfo(filename);
|
||||
if(fileinfo.isFile() && fileinfo.isReadable())
|
||||
{
|
||||
int index = m_pScene->open(filename);
|
||||
if(index >= 0)
|
||||
{
|
||||
QSettings settings;
|
||||
settings.setValue("OFF open directory",
|
||||
fileinfo.absoluteDir().absolutePath());
|
||||
this->addToRecentFiles(filename);
|
||||
|
||||
// update bbox
|
||||
updateViewerBBox();
|
||||
// update bbox
|
||||
updateViewerBBox();
|
||||
m_pViewer->update();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::readSettings()
|
||||
{
|
||||
this->readState("MainWindow", Size|State);
|
||||
this->readState("MainWindow", Size|State);
|
||||
}
|
||||
|
||||
void MainWindow::writeSettings()
|
||||
{
|
||||
this->writeState("MainWindow");
|
||||
std::cerr << "Write setting... done.\n";
|
||||
this->writeState("MainWindow");
|
||||
std::cerr << "Write setting... done.\n";
|
||||
}
|
||||
|
||||
void MainWindow::quit()
|
||||
{
|
||||
writeSettings();
|
||||
close();
|
||||
writeSettings();
|
||||
close();
|
||||
}
|
||||
|
||||
void MainWindow::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
writeSettings();
|
||||
event->accept();
|
||||
writeSettings();
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionLoadPolyhedron_triggered()
|
||||
{
|
||||
QSettings settings;
|
||||
QString directory = settings.value("OFF open directory",
|
||||
QDir::current().dirName()).toString();
|
||||
QStringList filenames =
|
||||
QFileDialog::getOpenFileNames(this,
|
||||
tr("Load polyhedron..."),
|
||||
directory,
|
||||
tr("OFF files (*.off)\n"
|
||||
"All files (*)"));
|
||||
if(!filenames.isEmpty()) {
|
||||
Q_FOREACH(QString filename, filenames) {
|
||||
open(filename);
|
||||
}
|
||||
}
|
||||
QSettings settings;
|
||||
QString directory = settings.value("OFF open directory",
|
||||
QDir::current().dirName()).toString();
|
||||
QStringList filenames =
|
||||
QFileDialog::getOpenFileNames(this,
|
||||
tr("Load polyhedron..."),
|
||||
directory,
|
||||
tr("OFF files (*.off)\n"
|
||||
"All files (*)"));
|
||||
if(!filenames.isEmpty()) {
|
||||
Q_FOREACH(QString filename, filenames) {
|
||||
open(filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::setAddKeyFrameKeyboardModifiers(::Qt::KeyboardModifiers m)
|
||||
{
|
||||
m_pViewer->setAddKeyFrameKeyboardModifiers(m);
|
||||
m_pViewer->setAddKeyFrameKeyboardModifiers(m);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionInside_points_triggered()
|
||||
{
|
||||
bool ok;
|
||||
|
||||
const unsigned int nb_points = (unsigned)
|
||||
QInputDialog::getInt(NULL, "#Points",
|
||||
"#Points:",10000,1,100000000,9,&ok);
|
||||
bool ok;
|
||||
|
||||
if(!ok)
|
||||
return;
|
||||
const unsigned int nb_points = (unsigned)
|
||||
QInputDialog::getInt(NULL, "#Points",
|
||||
"#Points:",10000,1,100000000,9,&ok);
|
||||
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->generate_inside_points(nb_points);
|
||||
QApplication::restoreOverrideCursor();
|
||||
if(!ok)
|
||||
return;
|
||||
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->generate_inside_points(nb_points);
|
||||
QApplication::restoreOverrideCursor();
|
||||
m_pViewer->update();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionPoints_in_interval_triggered()
|
||||
{
|
||||
bool ok;
|
||||
|
||||
const unsigned int nb_points = (unsigned)
|
||||
bool ok;
|
||||
|
||||
const unsigned int nb_points = (unsigned)
|
||||
QInputDialog::getInt(NULL, "#Points",
|
||||
"#Points:",10000,1,100000000,9,&ok);
|
||||
"#Points:",10000,1,100000000,9,&ok);
|
||||
|
||||
if(!ok)
|
||||
return;
|
||||
if(!ok)
|
||||
return;
|
||||
|
||||
const double min =
|
||||
QInputDialog::getDouble(NULL, "min",
|
||||
"Min:",-0.1,-1000.0,1000.0,9,&ok);
|
||||
if(!ok)
|
||||
return;
|
||||
const double max =
|
||||
QInputDialog::getDouble(NULL, "max",
|
||||
"Max:",0.1,-1000.0,1000.0,9,&ok);
|
||||
if(!ok)
|
||||
return;
|
||||
const double min =
|
||||
QInputDialog::getDouble(NULL, "min",
|
||||
"Min:",-0.1,-1000.0,1000.0,9,&ok);
|
||||
if(!ok)
|
||||
return;
|
||||
const double max =
|
||||
QInputDialog::getDouble(NULL, "max",
|
||||
"Max:",0.1,-1000.0,1000.0,9,&ok);
|
||||
if(!ok)
|
||||
return;
|
||||
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->generate_points_in(nb_points,min,max);
|
||||
QApplication::restoreOverrideCursor();
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->generate_points_in(nb_points,min,max);
|
||||
QApplication::restoreOverrideCursor();
|
||||
m_pViewer->update();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionBoundary_segments_triggered()
|
||||
{
|
||||
bool ok;
|
||||
|
||||
const unsigned int nb_slices = (unsigned)
|
||||
QInputDialog::getInt(NULL, "#Slices",
|
||||
"Slices:",100,1,1000000,8,&ok);
|
||||
bool ok;
|
||||
|
||||
if(!ok)
|
||||
return;
|
||||
const unsigned int nb_slices = (unsigned)
|
||||
QInputDialog::getInt(NULL, "#Slices",
|
||||
"Slices:",100,1,1000000,8,&ok);
|
||||
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->generate_boundary_segments(nb_slices);
|
||||
QApplication::restoreOverrideCursor();
|
||||
if(!ok)
|
||||
return;
|
||||
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->generate_boundary_segments(nb_slices);
|
||||
QApplication::restoreOverrideCursor();
|
||||
m_pViewer->update();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionBoundary_points_triggered()
|
||||
{
|
||||
bool ok;
|
||||
bool ok;
|
||||
|
||||
const unsigned int nb_points = (unsigned)
|
||||
QInputDialog::getInt(NULL, "#Points",
|
||||
"Points:",1000,1,10000000,8,&ok);
|
||||
const unsigned int nb_points = (unsigned)
|
||||
QInputDialog::getInt(NULL, "#Points",
|
||||
"Points:",1000,1,10000000,8,&ok);
|
||||
|
||||
if(!ok)
|
||||
return;
|
||||
if(!ok)
|
||||
return;
|
||||
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->generate_boundary_points(nb_points);
|
||||
QApplication::restoreOverrideCursor();
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->generate_boundary_points(nb_points);
|
||||
QApplication::restoreOverrideCursor();
|
||||
m_pViewer->update();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionEdge_points_triggered()
|
||||
{
|
||||
bool ok;
|
||||
bool ok;
|
||||
|
||||
const unsigned int nb_points = (unsigned)
|
||||
QInputDialog::getInt(NULL, "#Points",
|
||||
"Points:",1000,1,10000000,8,&ok);
|
||||
const unsigned int nb_points = (unsigned)
|
||||
QInputDialog::getInt(NULL, "#Points",
|
||||
"Points:",1000,1,10000000,8,&ok);
|
||||
|
||||
if(!ok)
|
||||
return;
|
||||
if(!ok)
|
||||
return;
|
||||
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->generate_edge_points(nb_points);
|
||||
QApplication::restoreOverrideCursor();
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->generate_edge_points(nb_points);
|
||||
QApplication::restoreOverrideCursor();
|
||||
m_pViewer->update();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionBench_distances_triggered()
|
||||
{
|
||||
bool ok;
|
||||
const double duration = QInputDialog::getDouble(NULL, "Duration",
|
||||
"Duration (s):",1.0,0.01,1000,8,&ok);
|
||||
if(!ok)
|
||||
return;
|
||||
bool ok;
|
||||
const double duration = QInputDialog::getDouble(NULL, "Duration",
|
||||
"Duration (s):",1.0,0.01,1000,8,&ok);
|
||||
if(!ok)
|
||||
return;
|
||||
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
std::cout << std::endl << "Benchmark distances" << std::endl;
|
||||
m_pScene->benchmark_distances(duration);
|
||||
QApplication::restoreOverrideCursor();
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
std::cout << std::endl << "Benchmark distances" << std::endl;
|
||||
m_pScene->benchmark_distances(duration);
|
||||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionBench_intersections_triggered()
|
||||
{
|
||||
bool ok;
|
||||
const double duration = QInputDialog::getDouble(NULL, "Duration",
|
||||
"Duration (s):",1.0,0.01,1000.0,8,&ok);
|
||||
if(!ok)
|
||||
return;
|
||||
bool ok;
|
||||
const double duration = QInputDialog::getDouble(NULL, "Duration",
|
||||
"Duration (s):",1.0,0.01,1000.0,8,&ok);
|
||||
if(!ok)
|
||||
return;
|
||||
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
std::cout << std::endl << "Benchmark intersections" << std::endl;
|
||||
m_pScene->benchmark_intersections(duration);
|
||||
QApplication::restoreOverrideCursor();
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
std::cout << std::endl << "Benchmark intersections" << std::endl;
|
||||
m_pScene->benchmark_intersections(duration);
|
||||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionUnsigned_distance_function_to_facets_triggered()
|
||||
{
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->activate_cutting_plane();
|
||||
m_pScene->unsigned_distance_function();
|
||||
QApplication::restoreOverrideCursor();
|
||||
m_pScene->unsigned_distance_function();
|
||||
QApplication::restoreOverrideCursor();
|
||||
m_pViewer->update();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionUnsigned_distance_function_to_edges_triggered()
|
||||
{
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->activate_cutting_plane();
|
||||
m_pScene->unsigned_distance_function_to_edges();
|
||||
QApplication::restoreOverrideCursor();
|
||||
m_pScene->unsigned_distance_function_to_edges();
|
||||
QApplication::restoreOverrideCursor();
|
||||
m_pViewer->update();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionSigned_distance_function_to_facets_triggered()
|
||||
{
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->activate_cutting_plane();
|
||||
m_pScene->signed_distance_function();
|
||||
QApplication::restoreOverrideCursor();
|
||||
m_pScene->signed_distance_function();
|
||||
QApplication::restoreOverrideCursor();
|
||||
m_pViewer->update();
|
||||
}
|
||||
|
||||
|
|
@ -318,19 +318,19 @@ void MainWindow::on_actionCutting_plane_none_triggered()
|
|||
|
||||
void MainWindow::on_actionView_polyhedron_triggered()
|
||||
{
|
||||
m_pScene->toggle_view_poyhedron();
|
||||
m_pScene->toggle_view_poyhedron();
|
||||
m_pViewer->update();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionView_points_triggered()
|
||||
{
|
||||
m_pScene->toggle_view_points();
|
||||
m_pScene->toggle_view_points();
|
||||
m_pViewer->update();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionView_segments_triggered()
|
||||
{
|
||||
m_pScene->toggle_view_segments();
|
||||
m_pScene->toggle_view_segments();
|
||||
m_pViewer->update();
|
||||
}
|
||||
|
||||
|
|
@ -342,13 +342,13 @@ void MainWindow::on_actionView_cutting_plane_triggered()
|
|||
|
||||
void MainWindow::on_actionClear_points_triggered()
|
||||
{
|
||||
m_pScene->clear_points();
|
||||
m_pScene->clear_points();
|
||||
m_pViewer->update();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionClear_segments_triggered()
|
||||
{
|
||||
m_pScene->clear_segments();
|
||||
m_pScene->clear_segments();
|
||||
m_pViewer->update();
|
||||
}
|
||||
|
||||
|
|
@ -360,52 +360,52 @@ void MainWindow::on_actionClear_cutting_plane_triggered()
|
|||
|
||||
void MainWindow::on_actionRefine_bisection_triggered()
|
||||
{
|
||||
bool ok;
|
||||
const double max_len =
|
||||
QInputDialog::getDouble(NULL, "Max edge len",
|
||||
"Max edge len:",0.1,0.001,100.0,9,&ok);
|
||||
if(!ok)
|
||||
return;
|
||||
bool ok;
|
||||
const double max_len =
|
||||
QInputDialog::getDouble(NULL, "Max edge len",
|
||||
"Max edge len:",0.1,0.001,100.0,9,&ok);
|
||||
if(!ok)
|
||||
return;
|
||||
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->refine_bisection(max_len * max_len);
|
||||
QApplication::restoreOverrideCursor();
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->refine_bisection(max_len * max_len);
|
||||
QApplication::restoreOverrideCursor();
|
||||
m_pViewer->update();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionBench_memory_triggered()
|
||||
{
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->bench_memory();
|
||||
QApplication::restoreOverrideCursor();
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->bench_memory();
|
||||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionBench_construction_triggered()
|
||||
{
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->bench_construction();
|
||||
QApplication::restoreOverrideCursor();
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->bench_construction();
|
||||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionBench_intersections_vs_nbt_triggered()
|
||||
{
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->bench_intersections_vs_nbt();
|
||||
QApplication::restoreOverrideCursor();
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->bench_intersections_vs_nbt();
|
||||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionBench_distances_vs_nbt_triggered()
|
||||
{
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->bench_distances_vs_nbt();
|
||||
QApplication::restoreOverrideCursor();
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->bench_distances_vs_nbt();
|
||||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionRefine_loop_triggered()
|
||||
{
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->refine_loop();
|
||||
QApplication::restoreOverrideCursor();
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->refine_loop();
|
||||
QApplication::restoreOverrideCursor();
|
||||
m_pViewer->update();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,79 +9,79 @@ class QDropEvent;
|
|||
class Scene;
|
||||
class Viewer;
|
||||
namespace Ui {
|
||||
class MainWindow;
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
|
||||
class MainWindow :
|
||||
public CGAL::Qt::DemosMainWindow
|
||||
class MainWindow :
|
||||
public CGAL::Qt::DemosMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
public:
|
||||
MainWindow(QWidget* parent = 0);
|
||||
~MainWindow();
|
||||
MainWindow(QWidget* parent = 0);
|
||||
~MainWindow();
|
||||
|
||||
public slots:
|
||||
void updateViewerBBox();
|
||||
void open(QString filename);
|
||||
void setAddKeyFrameKeyboardModifiers(Qt::KeyboardModifiers);
|
||||
public slots:
|
||||
void updateViewerBBox();
|
||||
void open(QString filename);
|
||||
void setAddKeyFrameKeyboardModifiers(Qt::KeyboardModifiers);
|
||||
|
||||
protected slots:
|
||||
protected slots:
|
||||
|
||||
// settings
|
||||
void quit();
|
||||
void readSettings();
|
||||
void writeSettings();
|
||||
// settings
|
||||
void quit();
|
||||
void readSettings();
|
||||
void writeSettings();
|
||||
|
||||
// drag & drop
|
||||
void dropEvent(QDropEvent *event);
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void dragEnterEvent(QDragEnterEvent *event);
|
||||
// drag & drop
|
||||
void dropEvent(QDropEvent *event);
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void dragEnterEvent(QDragEnterEvent *event);
|
||||
|
||||
// file menu
|
||||
void on_actionLoadPolyhedron_triggered();
|
||||
// file menu
|
||||
void on_actionLoadPolyhedron_triggered();
|
||||
|
||||
// edit menu
|
||||
// edit menu
|
||||
void on_actionSave_snapshot_triggered();
|
||||
void on_actionCopy_snapshot_triggered();
|
||||
void on_actionClear_points_triggered();
|
||||
void on_actionClear_segments_triggered();
|
||||
void on_actionClear_points_triggered();
|
||||
void on_actionClear_segments_triggered();
|
||||
void on_actionClear_cutting_plane_triggered();
|
||||
|
||||
// algorithm menu
|
||||
// algorithm menu
|
||||
void on_actionRefine_loop_triggered();
|
||||
void on_actionEdge_points_triggered();
|
||||
void on_actionInside_points_triggered();
|
||||
void on_actionBoundary_points_triggered();
|
||||
void on_actionRefine_bisection_triggered();
|
||||
void on_actionBoundary_segments_triggered();
|
||||
void on_actionEdge_points_triggered();
|
||||
void on_actionInside_points_triggered();
|
||||
void on_actionBoundary_points_triggered();
|
||||
void on_actionRefine_bisection_triggered();
|
||||
void on_actionBoundary_segments_triggered();
|
||||
void on_actionPoints_in_interval_triggered();
|
||||
void on_actionSigned_distance_function_to_facets_triggered();
|
||||
void on_actionUnsigned_distance_function_to_edges_triggered();
|
||||
void on_actionUnsigned_distance_function_to_facets_triggered();
|
||||
void on_actionSigned_distance_function_to_facets_triggered();
|
||||
void on_actionUnsigned_distance_function_to_edges_triggered();
|
||||
void on_actionUnsigned_distance_function_to_facets_triggered();
|
||||
void on_actionIntersection_cutting_plane_triggered();
|
||||
void on_actionCutting_plane_none_triggered();
|
||||
|
||||
// benchmark menu
|
||||
void on_actionBench_memory_triggered();
|
||||
void on_actionBench_distances_triggered();
|
||||
void on_actionBench_intersections_triggered();
|
||||
// benchmark menu
|
||||
void on_actionBench_memory_triggered();
|
||||
void on_actionBench_distances_triggered();
|
||||
void on_actionBench_intersections_triggered();
|
||||
|
||||
// benchmark against #triangles
|
||||
void on_actionBench_construction_triggered();
|
||||
void on_actionBench_distances_vs_nbt_triggered();
|
||||
void on_actionBench_intersections_vs_nbt_triggered();
|
||||
// benchmark against #triangles
|
||||
void on_actionBench_construction_triggered();
|
||||
void on_actionBench_distances_vs_nbt_triggered();
|
||||
void on_actionBench_intersections_vs_nbt_triggered();
|
||||
|
||||
// view menu
|
||||
void on_actionView_points_triggered();
|
||||
void on_actionView_segments_triggered();
|
||||
void on_actionView_polyhedron_triggered();
|
||||
// view menu
|
||||
void on_actionView_points_triggered();
|
||||
void on_actionView_segments_triggered();
|
||||
void on_actionView_polyhedron_triggered();
|
||||
void on_actionView_cutting_plane_triggered();
|
||||
|
||||
private:
|
||||
Scene* m_pScene;
|
||||
Viewer* m_pViewer;
|
||||
Ui::MainWindow* ui;
|
||||
Scene* m_pScene;
|
||||
Viewer* m_pViewer;
|
||||
Ui::MainWindow* ui;
|
||||
};
|
||||
|
||||
#endif // ifndef MAINWINDOW_H
|
||||
|
|
|
|||
|
|
@ -5,190 +5,190 @@
|
|||
#include <CGAL/Polyhedron_3.h>
|
||||
#include <queue>
|
||||
|
||||
template <class Kernel, class Polyhedron>
|
||||
template <class Kernel, class Polyhedron>
|
||||
class CEdge
|
||||
{
|
||||
public:
|
||||
typedef typename Kernel::FT FT;
|
||||
typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
|
||||
typedef typename Kernel::FT FT;
|
||||
typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
|
||||
|
||||
private:
|
||||
FT m_sqlen;
|
||||
Halfedge_handle m_he;
|
||||
FT m_sqlen;
|
||||
Halfedge_handle m_he;
|
||||
|
||||
public:
|
||||
// life cycle
|
||||
CEdge(const Halfedge_handle& he)
|
||||
{
|
||||
m_sqlen = squared_len(he);
|
||||
m_he = he;
|
||||
}
|
||||
CEdge(const CEdge& edge)
|
||||
: m_sqlen(edge.sqlen()),
|
||||
m_he(edge.he())
|
||||
{
|
||||
}
|
||||
~CEdge() {}
|
||||
// life cycle
|
||||
CEdge(const Halfedge_handle& he)
|
||||
{
|
||||
m_sqlen = squared_len(he);
|
||||
m_he = he;
|
||||
}
|
||||
CEdge(const CEdge& edge)
|
||||
: m_sqlen(edge.sqlen()),
|
||||
m_he(edge.he())
|
||||
{
|
||||
}
|
||||
~CEdge() {}
|
||||
|
||||
public:
|
||||
// squared length of an edge
|
||||
static FT squared_len(Halfedge_handle he)
|
||||
{
|
||||
return CGAL::squared_distance(he->vertex()->point(),
|
||||
he->opposite()->vertex()->point());
|
||||
}
|
||||
// squared length of an edge
|
||||
static FT squared_len(Halfedge_handle he)
|
||||
{
|
||||
return CGAL::squared_distance(he->vertex()->point(),
|
||||
he->opposite()->vertex()->point());
|
||||
}
|
||||
|
||||
public:
|
||||
// accessors
|
||||
FT& sqlen() { return m_sqlen; }
|
||||
const FT sqlen() const { return m_sqlen; }
|
||||
// accessors
|
||||
FT& sqlen() { return m_sqlen; }
|
||||
const FT sqlen() const { return m_sqlen; }
|
||||
|
||||
Halfedge_handle he() { return m_he; }
|
||||
const Halfedge_handle he() const { return m_he; }
|
||||
Halfedge_handle he() { return m_he; }
|
||||
const Halfedge_handle he() const { return m_he; }
|
||||
};
|
||||
|
||||
// functor for priority queue
|
||||
template<class Edge>
|
||||
struct less // read more priority
|
||||
{
|
||||
bool operator()(const Edge& e1,
|
||||
const Edge& e2) const
|
||||
{
|
||||
return e1.sqlen() < e2.sqlen();
|
||||
}
|
||||
{
|
||||
bool operator()(const Edge& e1,
|
||||
const Edge& e2) const
|
||||
{
|
||||
return e1.sqlen() < e2.sqlen();
|
||||
}
|
||||
};
|
||||
|
||||
template <class Kernel, class Polyhedron>
|
||||
template <class Kernel, class Polyhedron>
|
||||
class Refiner
|
||||
{
|
||||
// types
|
||||
typedef typename Kernel::FT FT;
|
||||
typedef CEdge<Kernel, Polyhedron> Edge;
|
||||
typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
|
||||
typedef typename Polyhedron::Edge_iterator Edge_iterator;
|
||||
typedef std::priority_queue<Edge,
|
||||
std::vector<Edge>,
|
||||
::less<Edge> > PQueue;
|
||||
// data
|
||||
PQueue m_queue;
|
||||
Polyhedron* m_pMesh;
|
||||
// types
|
||||
typedef typename Kernel::FT FT;
|
||||
typedef CEdge<Kernel, Polyhedron> Edge;
|
||||
typedef typename Polyhedron::Halfedge_handle Halfedge_handle;
|
||||
typedef typename Polyhedron::Edge_iterator Edge_iterator;
|
||||
typedef std::priority_queue<Edge,
|
||||
std::vector<Edge>,
|
||||
::less<Edge> > PQueue;
|
||||
// data
|
||||
PQueue m_queue;
|
||||
Polyhedron* m_pMesh;
|
||||
public :
|
||||
// life cycle
|
||||
Refiner(Polyhedron* pMesh)
|
||||
{
|
||||
m_pMesh = pMesh;
|
||||
}
|
||||
~Refiner() {}
|
||||
// life cycle
|
||||
Refiner(Polyhedron* pMesh)
|
||||
{
|
||||
m_pMesh = pMesh;
|
||||
}
|
||||
~Refiner() {}
|
||||
|
||||
public :
|
||||
|
||||
void fill_queue(const FT& max_sqlen)
|
||||
{
|
||||
for(Edge_iterator he = m_pMesh->edges_begin();
|
||||
he != m_pMesh->edges_end();
|
||||
he++)
|
||||
if(Edge::squared_len(he) > max_sqlen)
|
||||
m_queue.push(Edge(he));
|
||||
}
|
||||
void fill_queue(const FT& max_sqlen)
|
||||
{
|
||||
for(Edge_iterator he = m_pMesh->edges_begin();
|
||||
he != m_pMesh->edges_end();
|
||||
he++)
|
||||
if(Edge::squared_len(he) > max_sqlen)
|
||||
m_queue.push(Edge(he));
|
||||
}
|
||||
|
||||
void fill_queue()
|
||||
{
|
||||
for(Edge_iterator he = m_pMesh->edges_begin();
|
||||
he != m_pMesh->edges_end();
|
||||
he++)
|
||||
m_queue.push(Edge(he));
|
||||
}
|
||||
void fill_queue()
|
||||
{
|
||||
for(Edge_iterator he = m_pMesh->edges_begin();
|
||||
he != m_pMesh->edges_end();
|
||||
he++)
|
||||
m_queue.push(Edge(he));
|
||||
}
|
||||
|
||||
// run
|
||||
void run_nb_splits(const unsigned int nb_splits)
|
||||
{
|
||||
// fill queue
|
||||
fill_queue();
|
||||
// run
|
||||
void run_nb_splits(const unsigned int nb_splits)
|
||||
{
|
||||
// fill queue
|
||||
fill_queue();
|
||||
|
||||
unsigned int nb = 0;
|
||||
while(nb < nb_splits)
|
||||
{
|
||||
// get a copy of the candidate edge
|
||||
Edge edge = m_queue.top();
|
||||
m_queue.pop();
|
||||
unsigned int nb = 0;
|
||||
while(nb < nb_splits)
|
||||
{
|
||||
// get a copy of the candidate edge
|
||||
Edge edge = m_queue.top();
|
||||
m_queue.pop();
|
||||
|
||||
Halfedge_handle he = edge.he();
|
||||
// update point
|
||||
Halfedge_handle hnew = m_pMesh->split_edge(he);
|
||||
hnew->vertex()->point() = CGAL::midpoint(he->vertex()->point(),
|
||||
he->opposite()->vertex()->point());
|
||||
Halfedge_handle he = edge.he();
|
||||
// update point
|
||||
Halfedge_handle hnew = m_pMesh->split_edge(he);
|
||||
hnew->vertex()->point() = CGAL::midpoint(he->vertex()->point(),
|
||||
he->opposite()->vertex()->point());
|
||||
|
||||
// hit has been split into two edges
|
||||
m_queue.push(Edge(hnew));
|
||||
m_queue.push(Edge(he));
|
||||
// hit has been split into two edges
|
||||
m_queue.push(Edge(hnew));
|
||||
m_queue.push(Edge(he));
|
||||
|
||||
// split facet if possible
|
||||
if(!hnew->is_border())
|
||||
{
|
||||
m_pMesh->split_facet(hnew,hnew->next()->next());
|
||||
m_queue.push(Edge(hnew->next()));
|
||||
}
|
||||
// split facet if possible
|
||||
if(!hnew->is_border())
|
||||
{
|
||||
m_pMesh->split_facet(hnew,hnew->next()->next());
|
||||
m_queue.push(Edge(hnew->next()));
|
||||
}
|
||||
|
||||
// split facet if possible
|
||||
if(!hnew->opposite()->is_border())
|
||||
{
|
||||
m_pMesh->split_facet(hnew->opposite()->next(),
|
||||
hnew->opposite()->next()->next()->next());
|
||||
m_queue.push(Edge(hnew->opposite()->prev()));
|
||||
}
|
||||
// split facet if possible
|
||||
if(!hnew->opposite()->is_border())
|
||||
{
|
||||
m_pMesh->split_facet(hnew->opposite()->next(),
|
||||
hnew->opposite()->next()->next()->next());
|
||||
m_queue.push(Edge(hnew->opposite()->prev()));
|
||||
}
|
||||
|
||||
nb++;
|
||||
} // end while
|
||||
} // end run
|
||||
nb++;
|
||||
} // end while
|
||||
} // end run
|
||||
|
||||
|
||||
|
||||
// run
|
||||
unsigned int operator()(const FT& max_sqlen)
|
||||
{
|
||||
// fill queue
|
||||
fill_queue(max_sqlen);
|
||||
// run
|
||||
unsigned int operator()(const FT& max_sqlen)
|
||||
{
|
||||
// fill queue
|
||||
fill_queue(max_sqlen);
|
||||
|
||||
unsigned int nb_split = 0;
|
||||
while(!m_queue.empty())
|
||||
{
|
||||
// get a copy of the candidate edge
|
||||
Edge edge = m_queue.top();
|
||||
m_queue.pop();
|
||||
unsigned int nb_split = 0;
|
||||
while(!m_queue.empty())
|
||||
{
|
||||
// get a copy of the candidate edge
|
||||
Edge edge = m_queue.top();
|
||||
m_queue.pop();
|
||||
|
||||
Halfedge_handle he = edge.he();
|
||||
FT sqlen = Edge::squared_len(he);
|
||||
if(sqlen > max_sqlen)
|
||||
{
|
||||
// update point
|
||||
Halfedge_handle hnew = m_pMesh->split_edge(he);
|
||||
hnew->vertex()->point() = CGAL::midpoint(he->vertex()->point(),
|
||||
he->opposite()->vertex()->point());
|
||||
Halfedge_handle he = edge.he();
|
||||
FT sqlen = Edge::squared_len(he);
|
||||
if(sqlen > max_sqlen)
|
||||
{
|
||||
// update point
|
||||
Halfedge_handle hnew = m_pMesh->split_edge(he);
|
||||
hnew->vertex()->point() = CGAL::midpoint(he->vertex()->point(),
|
||||
he->opposite()->vertex()->point());
|
||||
|
||||
// hit has been split into two edges
|
||||
m_queue.push(Edge(hnew));
|
||||
m_queue.push(Edge(he));
|
||||
// hit has been split into two edges
|
||||
m_queue.push(Edge(hnew));
|
||||
m_queue.push(Edge(he));
|
||||
|
||||
// split facet if possible
|
||||
if(!hnew->is_border())
|
||||
{
|
||||
m_pMesh->split_facet(hnew,hnew->next()->next());
|
||||
m_queue.push(Edge(hnew->next()));
|
||||
}
|
||||
// split facet if possible
|
||||
if(!hnew->is_border())
|
||||
{
|
||||
m_pMesh->split_facet(hnew,hnew->next()->next());
|
||||
m_queue.push(Edge(hnew->next()));
|
||||
}
|
||||
|
||||
// split facet if possible
|
||||
if(!hnew->opposite()->is_border())
|
||||
{
|
||||
m_pMesh->split_facet(hnew->opposite()->next(),
|
||||
hnew->opposite()->next()->next()->next());
|
||||
m_queue.push(Edge(hnew->opposite()->prev()));
|
||||
}
|
||||
// split facet if possible
|
||||
if(!hnew->opposite()->is_border())
|
||||
{
|
||||
m_pMesh->split_facet(hnew->opposite()->next(),
|
||||
hnew->opposite()->next()->next()->next());
|
||||
m_queue.push(Edge(hnew->opposite()->prev()));
|
||||
}
|
||||
|
||||
nb_split++;
|
||||
} // end if(sqlen > max_sqlen)
|
||||
} // end while(!m_queue.empty())
|
||||
return nb_split;
|
||||
} // end run
|
||||
nb_split++;
|
||||
} // end if(sqlen > max_sqlen)
|
||||
} // end while(!m_queue.empty())
|
||||
return nb_split;
|
||||
} // end run
|
||||
};
|
||||
|
||||
#endif // _REFINER_H_
|
||||
|
|
|
|||
|
|
@ -590,7 +590,7 @@ void Scene::update_bbox()
|
|||
}
|
||||
|
||||
void Scene::draw(CGAL::QGLViewer* viewer)
|
||||
{
|
||||
{
|
||||
if(!gl_init)
|
||||
initGL();
|
||||
if(!are_buffers_initialized)
|
||||
|
|
|
|||
|
|
@ -60,22 +60,22 @@ public:
|
|||
public:
|
||||
// types
|
||||
typedef CGAL::Bbox_3 Bbox;
|
||||
|
||||
|
||||
private:
|
||||
typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron> Facet_Primitive;
|
||||
typedef CGAL::AABB_traits<Kernel, Facet_Primitive> Facet_Traits;
|
||||
typedef CGAL::AABB_tree<Facet_Traits> Facet_tree;
|
||||
|
||||
|
||||
typedef CGAL::AABB_halfedge_graph_segment_primitive<Polyhedron> Edge_Primitive;
|
||||
typedef CGAL::AABB_traits<Kernel, Edge_Primitive> Edge_Traits;
|
||||
typedef CGAL::AABB_tree<Edge_Traits> Edge_tree;
|
||||
|
||||
|
||||
typedef CGAL::qglviewer::ManipulatedFrame ManipulatedFrame;
|
||||
|
||||
|
||||
enum Cut_planes_types {
|
||||
NONE, UNSIGNED_FACETS, SIGNED_FACETS, UNSIGNED_EDGES, CUT_SEGMENTS
|
||||
};
|
||||
|
||||
|
||||
public:
|
||||
QGLContext* context;
|
||||
void draw(CGAL::QGLViewer*);
|
||||
|
|
@ -102,7 +102,7 @@ private:
|
|||
FT m_max_distance_function;
|
||||
typedef std::pair<Point,FT> Point_distance;
|
||||
Point_distance m_distance_function[100][100];
|
||||
|
||||
|
||||
// frame
|
||||
ManipulatedFrame* m_frame;
|
||||
bool m_view_plane;
|
||||
|
|
@ -112,10 +112,10 @@ private:
|
|||
// An aabb_tree indexing polyhedron facets/segments
|
||||
Facet_tree m_facet_tree;
|
||||
Edge_tree m_edge_tree;
|
||||
|
||||
|
||||
Cut_planes_types m_cut_plane;
|
||||
bool are_buffers_initialized;
|
||||
|
||||
|
||||
private:
|
||||
// utility functions
|
||||
Vector random_vector();
|
||||
|
|
@ -135,7 +135,7 @@ private:
|
|||
|
||||
template <typename Tree>
|
||||
void compute_distance_function(const Tree& tree);
|
||||
|
||||
|
||||
template <typename Tree>
|
||||
void sign_distance_function(const Tree& tree);
|
||||
|
||||
|
|
@ -182,7 +182,7 @@ public:
|
|||
void clear_points() { m_points.clear(); changed(); }
|
||||
void clear_segments() { m_segments.clear(); changed(); }
|
||||
void clear_cutting_plane();
|
||||
|
||||
|
||||
// fast distance setter
|
||||
void set_fast_distance(bool b) { m_fast_distance = b; update_grid_size(); }
|
||||
|
||||
|
|
@ -198,7 +198,7 @@ public:
|
|||
void refine_loop();
|
||||
void refine_bisection(const FT max_sqlen);
|
||||
|
||||
// distance functions
|
||||
// distance functions
|
||||
void signed_distance_function();
|
||||
void unsigned_distance_function();
|
||||
void unsigned_distance_function_to_edges();
|
||||
|
|
@ -215,7 +215,7 @@ public:
|
|||
bool m_view_segments;
|
||||
bool m_view_polyhedron;
|
||||
|
||||
// benchmarks
|
||||
// benchmarks
|
||||
enum {DO_INTERSECT,
|
||||
ANY_INTERSECTION,
|
||||
NB_INTERSECTIONS,
|
||||
|
|
@ -254,7 +254,7 @@ public:
|
|||
//timer sends a top when all the events are finished
|
||||
void timerEvent(QTimerEvent *);
|
||||
|
||||
|
||||
|
||||
public slots:
|
||||
// cutting plane
|
||||
void cutting_plane(bool override = false);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ void Viewer::mousePressEvent(QMouseEvent* e)
|
|||
m_pScene->cutting_plane(true);
|
||||
m_custom_mouse = true;
|
||||
}
|
||||
|
||||
|
||||
CGAL::QGLViewer::mousePressEvent(e);
|
||||
}
|
||||
|
||||
|
|
@ -55,10 +55,10 @@ void Viewer::mouseReleaseEvent(QMouseEvent* e)
|
|||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_pScene->cutting_plane(true);
|
||||
QApplication::restoreOverrideCursor();
|
||||
|
||||
|
||||
m_custom_mouse = false;
|
||||
}
|
||||
|
||||
|
||||
CGAL::QGLViewer::mouseReleaseEvent(e);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public:
|
|||
protected:
|
||||
virtual void mousePressEvent(QMouseEvent* e);
|
||||
virtual void mouseReleaseEvent(QMouseEvent* e);
|
||||
|
||||
|
||||
private:
|
||||
Scene* m_pScene;
|
||||
bool m_custom_mouse;
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ std::size_t Scene::nb_digits(std::size_t value)
|
|||
}
|
||||
|
||||
// bench memory against number of facets in the tree
|
||||
// the tree is reconstructed each timer in the mesh
|
||||
// the tree is reconstructed each timer in the mesh
|
||||
// refinement loop
|
||||
void Scene::bench_memory()
|
||||
{
|
||||
|
|
@ -168,8 +168,8 @@ void Scene::bench_construction()
|
|||
tree2.accelerate_distance_queries();
|
||||
double duration_construction_and_kdtree = time2.time();
|
||||
|
||||
std::cout << m_pPolyhedron->size_of_facets() << "\t"
|
||||
<< duration_construction_alone << "\t"
|
||||
std::cout << m_pPolyhedron->size_of_facets() << "\t"
|
||||
<< duration_construction_alone << "\t"
|
||||
<< duration_construction_and_kdtree << std::endl;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
\ingroup PkgAABBTreeConcepts
|
||||
\cgalConcept
|
||||
|
||||
The concept `AABBGeomTraits` defines the requirements for the first template parameter of the class `CGAL::AABB_traits<AABBGeomTraits, AABBPrimitive>`. It provides predicates and constructors to detect and compute intersections between query objects and the primitives stored in the AABB tree. In addition, it contains predicates and constructors to compute distances between a point query and the primitives stored in the AABB tree.
|
||||
The concept `AABBGeomTraits` defines the requirements for the first template parameter of the class `CGAL::AABB_traits<AABBGeomTraits, AABBPrimitive>`. It provides predicates and constructors to detect and compute intersections between query objects and the primitives stored in the AABB tree. In addition, it contains predicates and constructors to compute distances between a point query and the primitives stored in the AABB tree.
|
||||
|
||||
\cgalRefines `SearchGeomTraits_3`
|
||||
|
||||
|
|
@ -16,7 +16,7 @@ The concept `AABBGeomTraits` defines the requirements for the first template par
|
|||
class AABBGeomTraits {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
|
@ -25,50 +25,50 @@ A number type model of `Field`.
|
|||
typedef unspecified_type FT;
|
||||
|
||||
/*!
|
||||
Sphere type, that should be consistent with the distance function chosen for the distance queries, namely the `Squared_distance_3` functor.
|
||||
*/
|
||||
typedef unspecified_type Sphere_3;
|
||||
Sphere type, that should be consistent with the distance function chosen for the distance queries, namely the `Squared_distance_3` functor.
|
||||
*/
|
||||
typedef unspecified_type Sphere_3;
|
||||
|
||||
/*!
|
||||
Point type.
|
||||
*/
|
||||
typedef unspecified_type Point_3;
|
||||
*/
|
||||
typedef unspecified_type Point_3;
|
||||
|
||||
/*!
|
||||
A functor object to detect intersections between two geometric objects.
|
||||
Provides the operators:
|
||||
`bool operator()(const Type_1& type_1, const Type_2& type_2);`
|
||||
where `Type_1` and `Type_2` are relevant types
|
||||
among `Ray_3`, `Segment_3`, `Line_3`, `Triangle_3`, `Plane_3` and `Bbox_3`. Relevant herein means that a line primitive (ray, segment, line) is tested against a planar or solid primitive (plane, triangle, box), and a solid primitive is tested against another solid primitive (box against box). The operator returns `true` iff `type_1` and `type_2` have a non empty intersection.
|
||||
*/
|
||||
typedef unspecified_type Do_intersect_3;
|
||||
A functor object to detect intersections between two geometric objects.
|
||||
Provides the operators:
|
||||
`bool operator()(const Type_1& type_1, const Type_2& type_2);`
|
||||
where `Type_1` and `Type_2` are relevant types
|
||||
among `Ray_3`, `Segment_3`, `Line_3`, `Triangle_3`, `Plane_3` and `Bbox_3`. Relevant herein means that a line primitive (ray, segment, line) is tested against a planar or solid primitive (plane, triangle, box), and a solid primitive is tested against another solid primitive (box against box). The operator returns `true` iff `type_1` and `type_2` have a non empty intersection.
|
||||
*/
|
||||
typedef unspecified_type Do_intersect_3;
|
||||
|
||||
/*!
|
||||
A functor object to construct the intersection between two geometric objects.
|
||||
This functor must support the result_of protocol, that is the return
|
||||
This functor must support the result_of protocol, that is the return
|
||||
type of the `operator()(A, B)` is `CGAL::cpp11::result<Intersect_3(A,B)>`.
|
||||
|
||||
Provides the operators:
|
||||
`CGAL::cpp11::result<Intersect_3(A,B)> operator()(const A& a, const B& b);`
|
||||
where `A` and `B` are any relevant types among `Ray_3`, `Segment_3`, `Line_3`,
|
||||
`Triangle_3`, `Plane_3` and `Bbox_3`.
|
||||
Relevant herein means that a line primitive (ray, segment, line) is tested
|
||||
against a planar or solid primitive (plane, triangle, box).
|
||||
A model of `Kernel::Intersect_3` fulfills those requirements.
|
||||
*/
|
||||
typedef unspecified_type Intersect_3;
|
||||
Provides the operators:
|
||||
`CGAL::cpp11::result<Intersect_3(A,B)> operator()(const A& a, const B& b);`
|
||||
where `A` and `B` are any relevant types among `Ray_3`, `Segment_3`, `Line_3`,
|
||||
`Triangle_3`, `Plane_3` and `Bbox_3`.
|
||||
Relevant herein means that a line primitive (ray, segment, line) is tested
|
||||
against a planar or solid primitive (plane, triangle, box).
|
||||
A model of `Kernel::Intersect_3` fulfills those requirements.
|
||||
*/
|
||||
typedef unspecified_type Intersect_3;
|
||||
|
||||
/*!
|
||||
A functor object to construct the sphere centered at one point and passing through another one. Provides the operator:
|
||||
A functor object to construct the sphere centered at one point and passing through another one. Provides the operator:
|
||||
- `Sphere_3 operator()(const Point_3& p, const FT & sr)` which returns the sphere centered at `p` with `sr` as squared radius.
|
||||
*/
|
||||
typedef unspecified_type Construct_sphere_3;
|
||||
*/
|
||||
typedef unspecified_type Construct_sphere_3;
|
||||
|
||||
/*!
|
||||
A functor object to compute the point on a geometric primitive which is closest from a query. Provides the operator:
|
||||
`Point_3 operator()(const Type_2& type_2, const Point_3& p);` where `Type_2` can be any of the following types : `Segment_3`, `Ray_3`, or `Triangle_3`.
|
||||
The operator returns the point on `type_2` which is closest to `p`.
|
||||
*/
|
||||
A functor object to compute the point on a geometric primitive which is closest from a query. Provides the operator:
|
||||
`Point_3 operator()(const Type_2& type_2, const Point_3& p);` where `Type_2` can be any of the following types : `Segment_3`, `Ray_3`, or `Triangle_3`.
|
||||
The operator returns the point on `type_2` which is closest to `p`.
|
||||
*/
|
||||
typedef unspecified_type Construct_projected_point_3;
|
||||
|
||||
/*!
|
||||
|
|
@ -79,17 +79,17 @@ Provides the operator:
|
|||
typedef unspecified_type Compare_distance_3;
|
||||
|
||||
/*!
|
||||
A functor object to detect if a point lies inside a sphere or not.
|
||||
Provides the operator:
|
||||
`bool operator()(const Sphere_3& s, const Point_3& p);` which returns `true` iff the closed volume bounded by `s` contains `p`.
|
||||
*/
|
||||
typedef unspecified_type Has_on_bounded_side_3;
|
||||
A functor object to detect if a point lies inside a sphere or not.
|
||||
Provides the operator:
|
||||
`bool operator()(const Sphere_3& s, const Point_3& p);` which returns `true` iff the closed volume bounded by `s` contains `p`.
|
||||
*/
|
||||
typedef unspecified_type Has_on_bounded_side_3;
|
||||
|
||||
/*!
|
||||
A functor object to compute the squared radius of a sphere. Provides the operator:
|
||||
`FT operator()(const Sphere_3& s);` which returns the squared radius of `s`.
|
||||
*/
|
||||
typedef unspecified_type Compute_squared_radius_3;
|
||||
A functor object to compute the squared radius of a sphere. Provides the operator:
|
||||
`FT operator()(const Sphere_3& s);` which returns the squared radius of `s`.
|
||||
*/
|
||||
typedef unspecified_type Compute_squared_radius_3;
|
||||
|
||||
/*!
|
||||
A functor object to compute the squared distance between two points. Provides the operator:
|
||||
|
|
@ -126,29 +126,29 @@ typedef unspecified_type Equal_3;
|
|||
|
||||
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Returns the intersection detection functor.
|
||||
*/
|
||||
Do_intersect_3 do_intersect_3_object();
|
||||
Returns the intersection detection functor.
|
||||
*/
|
||||
Do_intersect_3 do_intersect_3_object();
|
||||
|
||||
/*!
|
||||
Returns the intersection constructor.
|
||||
*/
|
||||
Intersect_3 intersect_3_object();
|
||||
Returns the intersection constructor.
|
||||
*/
|
||||
Intersect_3 intersect_3_object();
|
||||
|
||||
/*!
|
||||
Returns the sphere constructor.
|
||||
*/
|
||||
Construct_sphere_3 construct_sphere_3_object();
|
||||
*/
|
||||
Construct_sphere_3 construct_sphere_3_object();
|
||||
|
||||
/*!
|
||||
Returns the closest point constructor.
|
||||
*/
|
||||
Returns the closest point constructor.
|
||||
*/
|
||||
Construct_projected_point_3 construct_projected_point_3_object();
|
||||
|
||||
/*!
|
||||
|
|
@ -157,14 +157,14 @@ Returns the compare distance constructor.
|
|||
Compare_distance_3 compare_distance_3_object();
|
||||
|
||||
/*!
|
||||
Returns the closest point constructor.
|
||||
*/
|
||||
Has_on_bounded_side_3 has_on_bounded_side_3_object();
|
||||
Returns the closest point constructor.
|
||||
*/
|
||||
Has_on_bounded_side_3 has_on_bounded_side_3_object();
|
||||
|
||||
/*!
|
||||
Returns the squared radius functor.
|
||||
*/
|
||||
Compute_squared_radius_3 compute_squared_radius_3_object();
|
||||
Returns the squared radius functor.
|
||||
*/
|
||||
Compute_squared_radius_3 compute_squared_radius_3_object();
|
||||
|
||||
/*!
|
||||
Returns the squared distance functor.
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@
|
|||
\ingroup PkgAABBTreeConcepts
|
||||
\cgalConcept
|
||||
|
||||
The concept `AABBPrimitive` describes the requirements for the primitives stored in the AABB tree data structure. The concept encapsulates a type for the input datum (a geometric object) and an identifier (id) type through which those primitives are referred to. The concept `AABBPrimitive` also refines the concepts DefaultConstructible and Assignable.
|
||||
The concept `AABBPrimitive` describes the requirements for the primitives stored in the AABB tree data structure. The concept encapsulates a type for the input datum (a geometric object) and an identifier (id) type through which those primitives are referred to. The concept `AABBPrimitive` also refines the concepts DefaultConstructible and Assignable.
|
||||
|
||||
\sa `CGAL::AABB_tree<AABBTraits>`
|
||||
\sa `CGAL::AABB_tree<AABBTraits>`
|
||||
\sa `AABBPrimitiveWithSharedData`
|
||||
|
||||
\cgalHeading{Example}
|
||||
|
||||
The `Primitive` type can be, e.g., a wrapper around a `Handle`. Assume for instance that the input objects are the triangle faces of a mesh stored as a `CGAL::Polyhedron_3`. The `Datum` would be a `Triangle_3` and the `Id` would be a polyhedron `Face_handle`. Method `datum()` can return either a `Triangle_3` constructed on the fly from the face handle or a `Triangle_3` stored internally. This provides a way for the user to trade memory for efficiency.
|
||||
The `Primitive` type can be, e.g., a wrapper around a `Handle`. Assume for instance that the input objects are the triangle faces of a mesh stored as a `CGAL::Polyhedron_3`. The `Datum` would be a `Triangle_3` and the `Id` would be a polyhedron `Face_handle`. Method `datum()` can return either a `Triangle_3` constructed on the fly from the face handle or a `Triangle_3` stored internally. This provides a way for the user to trade memory for efficiency.
|
||||
|
||||
\cgalHasModel `CGAL::AABB_primitive<Id,ObjectPropertyMap,PointPropertyMap,Tag_false,CacheDatum>`
|
||||
\cgalHasModel `CGAL::AABB_segment_primitive<Iterator,CacheDatum>`
|
||||
|
|
@ -22,18 +22,18 @@ The `Primitive` type can be, e.g., a wrapper around a `Handle`. Assume for insta
|
|||
class AABBPrimitive {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
3D point type.
|
||||
*/
|
||||
typedef unspecified_type Point;
|
||||
3D point type.
|
||||
*/
|
||||
typedef unspecified_type Point;
|
||||
|
||||
/*!
|
||||
Type of input datum.
|
||||
*/
|
||||
typedef unspecified_type Datum;
|
||||
Type of input datum.
|
||||
*/
|
||||
typedef unspecified_type Datum;
|
||||
|
||||
/*!
|
||||
Point reference type returned by the function `point()`. It is convertible to the type `Point`.
|
||||
|
|
@ -46,29 +46,29 @@ Datum reference type returned by the function `datum()`. It is convertible to th
|
|||
typedef unspecified_type Datum_reference;
|
||||
|
||||
/*!
|
||||
Type of identifiers through which the input objects are referred to. It must be a model of the concepts DefaultConstructible and Assignable.
|
||||
*/
|
||||
typedef unspecified_type Id;
|
||||
Type of identifiers through which the input objects are referred to. It must be a model of the concepts DefaultConstructible and Assignable.
|
||||
*/
|
||||
typedef unspecified_type Id;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Returns the datum (geometric object) represented by the primitive.
|
||||
*/
|
||||
Datum_reference datum();
|
||||
Returns the datum (geometric object) represented by the primitive.
|
||||
*/
|
||||
Datum_reference datum();
|
||||
|
||||
/*!
|
||||
Returns the corresponding identifier. This identifier is only used as a reference for the objects in the output of the `AABB_tree` methods.
|
||||
*/
|
||||
Id id();
|
||||
Returns the corresponding identifier. This identifier is only used as a reference for the objects in the output of the `AABB_tree` methods.
|
||||
*/
|
||||
Id id();
|
||||
|
||||
/*!
|
||||
Returns a 3D point located on the geometric object represented by the primitive. This function is used to sort the primitives during the AABB tree construction as well as to construct the search KD-tree internal to the AABB tree used to accelerate distance queries.
|
||||
*/
|
||||
Point_reference reference_point();
|
||||
Returns a 3D point located on the geometric object represented by the primitive. This function is used to sort the primitives during the AABB tree construction as well as to construct the search KD-tree internal to the AABB tree used to accelerate distance queries.
|
||||
*/
|
||||
Point_reference reference_point();
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ namespace CGAL {
|
|||
|
||||
/*!
|
||||
|
||||
\mainpage User Manual
|
||||
\mainpage User Manual
|
||||
\anchor Chapter_3D_Fast_Intersection_and_Distance_Computation
|
||||
\cgalAutoToc
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ closest point from a point query to a set of triangles.
|
|||
|
||||
Note that this component is not suited to the problem of finding all
|
||||
intersecting pairs of objects. We refer to the component
|
||||
\ref chapterBoxIntersection "Intersecting Sequences of dD Iso-oriented Boxes"
|
||||
\ref chapterBoxIntersection "Intersecting Sequences of dD Iso-oriented Boxes"
|
||||
which can find all intersecting pairs of iso-oriented boxes.
|
||||
|
||||
The AABB tree data structure takes as input an iterator range of
|
||||
|
|
@ -59,7 +59,7 @@ intersection *tests* which do not construct any intersection
|
|||
objects, from *intersections* which construct the intersection
|
||||
objects.
|
||||
|
||||
Tests:
|
||||
Tests:
|
||||
|
||||
- Function `AABB_tree::do_intersect()` tests if the input primitives are
|
||||
intersected by the query. This function is fast as it involves only
|
||||
|
|
@ -79,7 +79,7 @@ the intersections with respect to the query.
|
|||
the intersecting primitive id (if any) of the corresponding
|
||||
intersection object that is closest to the source of the ray.
|
||||
|
||||
Constructions:
|
||||
Constructions:
|
||||
|
||||
- Function `AABB_tree::all_intersections()` detects and constructs all
|
||||
intersection objects with the input primitives.
|
||||
|
|
@ -216,7 +216,7 @@ option which maximizes speed.
|
|||
\subsection aabb_tree_perf_cons Construction
|
||||
|
||||
The surface triangle mesh chosen for benchmarking the tree
|
||||
construction is the knot model (14,400 triangles) depicted by
|
||||
construction is the knot model (14,400 triangles) depicted by
|
||||
\cgalFigureRef{figAABB-tree-bench}. We measure the tree construction time (both
|
||||
AABB tree alone and AABB tree with internal KD-tree) for this model as
|
||||
well as for three denser versions subdivided through the Loop
|
||||
|
|
@ -254,7 +254,7 @@ the function `AABB_tree::accelerate_distance_queries()` which
|
|||
takes an iterator range as input.
|
||||
|
||||
| Number of triangles | AABB tree (in MBytes) | AABB tree with internal KD-tree (in MBytes)|
|
||||
| ----: | ----: | ----: |
|
||||
| ----: | ----: | ----: |
|
||||
18,400 | 1.10 | 2.76 |
|
||||
102,400 | 6.33 | 14.73 |
|
||||
1,022,400 | 59.56 | 151.31 |
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public:
|
|||
// this is the type of data that the queries returns. For this example
|
||||
// we imagine that, for some reasons, we do not want to store the iterators
|
||||
// of the vector, but raw pointers. This is to show that the Id type
|
||||
// does not have to be the same as the one of the input parameter of the
|
||||
// does not have to be the same as the one of the input parameter of the
|
||||
// constructor.
|
||||
typedef const My_triangle* Id;
|
||||
|
||||
|
|
@ -62,14 +62,14 @@ private:
|
|||
public:
|
||||
My_triangle_primitive() {} // default constructor needed
|
||||
|
||||
// the following constructor is the one that receives the iterators from the
|
||||
// the following constructor is the one that receives the iterators from the
|
||||
// iterator range given as input to the AABB_tree
|
||||
My_triangle_primitive(Iterator it)
|
||||
: m_pt(&(*it)) {}
|
||||
|
||||
const Id& id() const { return m_pt; }
|
||||
|
||||
// utility function to convert a custom
|
||||
// utility function to convert a custom
|
||||
// point type to CGAL point type.
|
||||
Point convert(const My_point *p) const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ typedef CGAL::Simple_cartesian<double> K;
|
|||
|
||||
|
||||
// The points are stored in a flat array of doubles
|
||||
// The triangles are stored in a flat array of indices
|
||||
// The triangles are stored in a flat array of indices
|
||||
// referring to an array of coordinates: three consecutive
|
||||
// coordinates represent a point, and three consecutive
|
||||
// indices represent a triangle.
|
||||
|
|
@ -60,7 +60,7 @@ private:
|
|||
public:
|
||||
My_triangle_primitive() {} // default constructor needed
|
||||
|
||||
// the following constructor is the one that receives the iterators from the
|
||||
// the following constructor is the one that receives the iterators from the
|
||||
// iterator range given as input to the AABB_tree
|
||||
My_triangle_primitive(Triangle_iterator a)
|
||||
: m_it(a) {}
|
||||
|
|
@ -69,18 +69,18 @@ public:
|
|||
|
||||
// on the fly conversion from the internal data to the CGAL types
|
||||
Datum datum() const
|
||||
{
|
||||
{
|
||||
Point_index_iterator p_it = m_it.base();
|
||||
Point p(*(point_container + 3 * (*p_it)),
|
||||
*(point_container + 3 * (*p_it) + 1),
|
||||
Point p(*(point_container + 3 * (*p_it)),
|
||||
*(point_container + 3 * (*p_it) + 1),
|
||||
*(point_container + 3 * (*p_it) + 2) );
|
||||
++p_it;
|
||||
Point q(*(point_container + 3 * (*p_it)),
|
||||
*(point_container + 3 * (*p_it) + 1),
|
||||
Point q(*(point_container + 3 * (*p_it)),
|
||||
*(point_container + 3 * (*p_it) + 1),
|
||||
*(point_container + 3 * (*p_it) + 2));
|
||||
++p_it;
|
||||
Point r(*(point_container + 3 * (*p_it)),
|
||||
*(point_container + 3 * (*p_it) + 1),
|
||||
Point r(*(point_container + 3 * (*p_it)),
|
||||
*(point_container + 3 * (*p_it) + 1),
|
||||
*(point_container + 3 * (*p_it) + 2));
|
||||
|
||||
return Datum(p, q, r); // assembles triangle from three points
|
||||
|
|
@ -88,9 +88,9 @@ public:
|
|||
|
||||
// one point which must be on the primitive
|
||||
Point reference_point() const
|
||||
{
|
||||
return Point(*(point_container + 3 * (*m_it)),
|
||||
*(point_container + 3 * (*m_it) + 1),
|
||||
{
|
||||
return Point(*(point_container + 3 * (*m_it)),
|
||||
*(point_container + 3 * (*m_it) + 1),
|
||||
*(point_container + 3 * (*m_it) + 2));
|
||||
}
|
||||
};
|
||||
|
|
@ -119,7 +119,7 @@ int main()
|
|||
triangles[6] = 0; triangles[7] = 3; triangles[8] = 2;
|
||||
|
||||
// constructs AABB tree
|
||||
Tree tree(Triangle_iterator(triangles),
|
||||
Tree tree(Triangle_iterator(triangles),
|
||||
Triangle_iterator(triangles+9));
|
||||
|
||||
// counts #intersections
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ struct My_point {
|
|||
: x(_x), y(_y), z(_z) {}
|
||||
};
|
||||
|
||||
// The triangles are stored in a flat array of indices
|
||||
// The triangles are stored in a flat array of indices
|
||||
// referring to an array of points: three consecutive
|
||||
// indices represent a triangle.
|
||||
typedef std::vector<size_t>::const_iterator Point_index_iterator;
|
||||
|
|
@ -71,7 +71,7 @@ private:
|
|||
public:
|
||||
My_triangle_primitive() {} // default constructor needed
|
||||
|
||||
// the following constructor is the one that receives the iterators from the
|
||||
// the following constructor is the one that receives the iterators from the
|
||||
// iterator range given as input to the AABB_tree
|
||||
My_triangle_primitive(Triangle_iterator a)
|
||||
: m_it(a) {}
|
||||
|
|
@ -80,7 +80,7 @@ public:
|
|||
|
||||
// on the fly conversion from the internal data to the CGAL types
|
||||
Datum datum() const
|
||||
{
|
||||
{
|
||||
Point_index_iterator p_it = m_it.base();
|
||||
const My_point& mp = (*point_container)[*p_it];
|
||||
Point p(mp.x, mp.y, mp.z);
|
||||
|
|
@ -96,7 +96,7 @@ public:
|
|||
|
||||
// one point which must be on the primitive
|
||||
Point reference_point() const
|
||||
{
|
||||
{
|
||||
const My_point& mp = (*point_container)[*m_it];
|
||||
return Point(mp.x, mp.y, mp.z);
|
||||
}
|
||||
|
|
@ -121,16 +121,16 @@ int main()
|
|||
points.push_back(a);
|
||||
points.push_back(b);
|
||||
points.push_back(c);
|
||||
points.push_back(d);
|
||||
points.push_back(d);
|
||||
|
||||
// generates indexed triangle set
|
||||
std::vector<size_t> triangles;
|
||||
triangles.push_back(0); triangles.push_back(1); triangles.push_back(2);
|
||||
triangles.push_back(0); triangles.push_back(1); triangles.push_back(3);
|
||||
triangles.push_back(0); triangles.push_back(3); triangles.push_back(2);
|
||||
triangles.push_back(0); triangles.push_back(1); triangles.push_back(2);
|
||||
triangles.push_back(0); triangles.push_back(1); triangles.push_back(3);
|
||||
triangles.push_back(0); triangles.push_back(3); triangles.push_back(2);
|
||||
|
||||
// constructs AABB tree
|
||||
Tree tree(Triangle_iterator(triangles.begin()),
|
||||
Tree tree(Triangle_iterator(triangles.begin()),
|
||||
Triangle_iterator(triangles.end()));
|
||||
|
||||
// counts #intersections
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
// Author(s) : Camille Wormser, Pierre Alliez
|
||||
// Example of an AABB tree used with a simple list of
|
||||
// Example of an AABB tree used with a simple list of
|
||||
// triangles (a triangle soup) stored into an array of points.
|
||||
|
||||
#include <iostream>
|
||||
|
|
@ -25,7 +25,7 @@ struct My_point {
|
|||
My_point (double _x, double _y, double _z) : x(_x), y(_y), z(_z) {}
|
||||
};
|
||||
|
||||
// The triangles are stored in a flat vector of points (a triangle soup):
|
||||
// The triangles are stored in a flat vector of points (a triangle soup):
|
||||
// three consecutive points represent a triangle
|
||||
typedef std::vector<My_point>::const_iterator Point_iterator;
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ private:
|
|||
public:
|
||||
My_triangle_primitive() {} // default constructor needed
|
||||
|
||||
// the following constructor is the one that receives the iterators from the
|
||||
// the following constructor is the one that receives the iterators from the
|
||||
// iterator range given as input to the AABB_tree
|
||||
My_triangle_primitive(Triangle_iterator a)
|
||||
: m_it(a) {}
|
||||
|
|
@ -76,7 +76,7 @@ public:
|
|||
// on the fly conversion from the internal data
|
||||
// to the CGAL types
|
||||
Datum datum() const
|
||||
{
|
||||
{
|
||||
Point_iterator p_it = m_it.base();
|
||||
Point p(p_it->x, p_it->y, p_it->z);
|
||||
++p_it;
|
||||
|
|
@ -89,7 +89,7 @@ public:
|
|||
|
||||
// returns one point which must be on the primitive
|
||||
Point reference_point() const
|
||||
{
|
||||
{
|
||||
return Point(m_it->x, m_it->y, m_it->z);
|
||||
}
|
||||
};
|
||||
|
|
@ -107,12 +107,12 @@ int main()
|
|||
My_point d(0.0, 0.0, 0.0);
|
||||
|
||||
std::vector<My_point> triangles;
|
||||
triangles.push_back(a); triangles.push_back(b); triangles.push_back(c);
|
||||
triangles.push_back(a); triangles.push_back(b); triangles.push_back(d);
|
||||
triangles.push_back(a); triangles.push_back(d); triangles.push_back(c);
|
||||
triangles.push_back(a); triangles.push_back(b); triangles.push_back(c);
|
||||
triangles.push_back(a); triangles.push_back(b); triangles.push_back(d);
|
||||
triangles.push_back(a); triangles.push_back(d); triangles.push_back(c);
|
||||
|
||||
// constructs AABB tree
|
||||
Tree tree(Triangle_iterator(triangles.begin()),
|
||||
Tree tree(Triangle_iterator(triangles.begin()),
|
||||
Triangle_iterator(triangles.end()));
|
||||
|
||||
// counts #intersections
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ void run(const HalfedgeGraph& graph){
|
|||
typename Kernel::Point_3 q(0.0, 1.0, 0.0);
|
||||
typename Kernel::Point_3 r(0.0, 0.0, 1.0);
|
||||
|
||||
// constructs the AABB tree and the internal search tree for
|
||||
// efficient distance queries.
|
||||
// constructs the AABB tree and the internal search tree for
|
||||
// efficient distance queries.
|
||||
Tree tree( CGAL::edges(graph).first,
|
||||
CGAL::edges(graph).second, graph);
|
||||
tree.accelerate_distance_queries();
|
||||
|
|
@ -40,7 +40,7 @@ void run(const HalfedgeGraph& graph){
|
|||
typename Kernel::Point_3 point_query(2.0, 2.0, 2.0);
|
||||
typename Kernel::Point_3 closest = tree.closest_point(point_query);
|
||||
|
||||
std::cerr << "closest point is: " << closest << std::endl;
|
||||
std::cerr << "closest point is: " << closest << std::endl;
|
||||
}
|
||||
|
||||
int main()
|
||||
|
|
@ -51,7 +51,7 @@ int main()
|
|||
Point s(0.0, 0.0, 0.0);
|
||||
Polyhedron polyhedron;
|
||||
polyhedron.make_tetrahedron(p, q, r, s);
|
||||
|
||||
|
||||
run<K>(polyhedron);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ int main()
|
|||
Polyhedron polyhedron;
|
||||
polyhedron.make_tetrahedron(p, q, r, s);
|
||||
|
||||
// constructs the AABB tree and the internal search tree for
|
||||
// constructs the AABB tree and the internal search tree for
|
||||
// efficient distance queries.
|
||||
Tree tree( CGAL::edges(polyhedron).first,
|
||||
CGAL::edges(polyhedron).second,
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ int main()
|
|||
Polyhedron polyhedron;
|
||||
polyhedron.make_tetrahedron(p, q, r, s);
|
||||
|
||||
// constructs AABB tree and computes internal KD-tree
|
||||
// constructs AABB tree and computes internal KD-tree
|
||||
// data structure to accelerate distance queries
|
||||
Tree tree(faces(polyhedron).first, faces(polyhedron).second, polyhedron);
|
||||
tree.accelerate_distance_queries();
|
||||
|
|
@ -50,7 +50,7 @@ int main()
|
|||
Polyhedron::Face_handle f = pp.second; // closest primitive id
|
||||
std::cout << "closest point: " << closest_point << std::endl;
|
||||
std::cout << "closest triangle: ( "
|
||||
<< f->halfedge()->vertex()->point() << " , "
|
||||
<< f->halfedge()->vertex()->point() << " , "
|
||||
<< f->halfedge()->next()->vertex()->point() << " , "
|
||||
<< f->halfedge()->next()->next()->vertex()->point()
|
||||
<< " )" << std::endl;
|
||||
|
|
|
|||
|
|
@ -80,10 +80,10 @@ int main()
|
|||
Plane_intersection plane_intersection = tree.any_intersection(plane_query);
|
||||
if(plane_intersection)
|
||||
{
|
||||
|
||||
|
||||
if(boost::get<Segment>(&(plane_intersection->first)))
|
||||
std::cout << "intersection object is a segment" << std::endl;
|
||||
}
|
||||
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ int main()
|
|||
segments.push_back(Segment(a,c));
|
||||
segments.push_back(Segment(c,d));
|
||||
|
||||
// constructs the AABB tree and the internal search tree for
|
||||
// constructs the AABB tree and the internal search tree for
|
||||
// efficient distance computations.
|
||||
Tree tree(segments.begin(),segments.end());
|
||||
tree.accelerate_distance_queries();
|
||||
|
|
@ -48,7 +48,7 @@ int main()
|
|||
std::cout << tree.number_of_intersected_primitives(triangle_query)
|
||||
<< " intersections(s) with triangle" << std::endl;
|
||||
|
||||
// computes the closest point from a point query
|
||||
// computes the closest point from a point query
|
||||
Point point_query(2.0, 2.0, 2.0);
|
||||
Point closest = tree.closest_point(point_query);
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
This component implements a hierarchy of axis-aligned bounding boxes (a AABB tree) for efficient intersection and distance computations between 3D queries and sets of input 3D geometric objects.
|
||||
This component implements a hierarchy of axis-aligned bounding boxes (a AABB tree) for efficient intersection and distance computations between 3D queries and sets of input 3D geometric objects.
|
||||
|
|
|
|||
|
|
@ -43,17 +43,17 @@ int main(void)
|
|||
std::cout << "error reading bunny" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Tree t1(faces(m).begin(), faces(m).end(), m);
|
||||
Tree2 t2(faces(m).begin(), faces(m).end(), m);
|
||||
Tree3 t3(faces(m).begin(), faces(m).end(), m);
|
||||
Tree4 t4(faces(m).begin(), faces(m).end(), m);
|
||||
|
||||
|
||||
t1.build();
|
||||
t2.build();
|
||||
t3.build();
|
||||
t4.build();
|
||||
|
||||
|
||||
Primitive p1(faces(m).begin(), m);
|
||||
Primitive2 p2(faces(m).begin(), m);
|
||||
Primitive3 p3(faces(m).begin(), m);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ int main()
|
|||
tree.all_intersected_primitives(triangle_query, devnull);
|
||||
assert(!tree.any_intersected_primitive(triangle_query));
|
||||
assert(!tree.any_intersection(triangle_query));
|
||||
//Cannot call tree.bbox();
|
||||
//Cannot call tree.bbox();
|
||||
tree.build();
|
||||
tree.clear();
|
||||
//Cannot call tree.closest_*(...)
|
||||
|
|
|
|||
|
|
@ -25,14 +25,14 @@ typedef K::Segment_3 Segment;
|
|||
typedef K::Ray_3 Ray;
|
||||
typedef CGAL::Surface_mesh<CGAL::Point_3<CGAL::Epick> > Mesh;
|
||||
typedef CGAL::AABB_face_graph_triangle_primitive<Mesh,
|
||||
CGAL::Default,
|
||||
CGAL::Default,
|
||||
CGAL::Tag_false> T_Primitive;
|
||||
typedef CGAL::AABB_traits<K, T_Primitive> T_Traits;
|
||||
typedef CGAL::AABB_tree<T_Traits> T_Tree;
|
||||
typedef T_Tree::Primitive_id T_Primitive_id;
|
||||
|
||||
typedef CGAL::AABB_halfedge_graph_segment_primitive<Mesh,
|
||||
CGAL::Default,
|
||||
CGAL::Default,
|
||||
CGAL::Tag_false> E_Primitive;
|
||||
typedef CGAL::AABB_traits<K, E_Primitive> E_Traits;
|
||||
typedef CGAL::AABB_tree<E_Traits> E_Tree;
|
||||
|
|
@ -61,8 +61,8 @@ int main()
|
|||
tree.insert(faces(m2).first, faces(m2).second, m2);
|
||||
tree.build();
|
||||
T_Tree::Bounding_box bbox = tree.bbox();
|
||||
Point bbox_center((bbox.xmin() + bbox.xmax()) / 2,
|
||||
(bbox.ymin() + bbox.ymax()) / 2,
|
||||
Point bbox_center((bbox.xmin() + bbox.xmax()) / 2,
|
||||
(bbox.ymin() + bbox.ymax()) / 2,
|
||||
(bbox.zmin() + bbox.zmax()) / 2);
|
||||
std::vector< T_Primitive_id > intersections;
|
||||
Ray ray(bbox_center+Vector(3,-0.25,0),bbox_center+Vector(-3,+0.25,0));
|
||||
|
|
@ -75,8 +75,8 @@ int main()
|
|||
Ray e_ray(Point(0,0,0),Point(0,1,1));
|
||||
e_tree.all_intersected_primitives(e_ray,
|
||||
std::back_inserter(e_intersections));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,10 +47,10 @@ int main()
|
|||
tree.insert(segments.begin(), segments.end());
|
||||
tree.build();
|
||||
assert(tree.closest_point(Point(-0.1, -0.1, -0.1)) == Point(0, 0, 0));
|
||||
assert(tree.closest_point(Point(-0.1, -0.1, -0.1), Point(0, 0, 0)) ==
|
||||
Point(0, 0, 0));
|
||||
assert(tree.closest_point(Point(-0.1, -0.1, -0.1), Point(0, 0, 0)) ==
|
||||
Point(0, 0, 0));
|
||||
assert(tree.closest_point_and_primitive(Point(-0.1, -0.1, -0.1)).second ==
|
||||
segments.begin());
|
||||
segments.begin());
|
||||
// Too lazy to call closest_point_and_primitive with a hint. The API is
|
||||
// strange. --Laurent Rineau, 2013/01/16
|
||||
assert(tree.do_intersect(plane_query) == true);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
An instance of `Algebraic_structure_traits` is a model of `AlgebraicStructureTraits`, where <span class="textsc">T</span> is the associated type.
|
||||
An instance of `Algebraic_structure_traits` is a model of `AlgebraicStructureTraits`, where <span class="textsc">T</span> is the associated type.
|
||||
|
||||
\cgalModels `AlgebraicStructureTraits`
|
||||
|
||||
|
|
@ -19,13 +19,13 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
Tag indicating that a type is a model of the
|
||||
`EuclideanRing` concept.
|
||||
Tag indicating that a type is a model of the
|
||||
`EuclideanRing` concept.
|
||||
|
||||
\cgalModels `DefaultConstructible`
|
||||
|
||||
\sa `EuclideanRing`
|
||||
\sa `AlgebraicStructureTraits`
|
||||
\sa `EuclideanRing`
|
||||
\sa `AlgebraicStructureTraits`
|
||||
|
||||
*/
|
||||
|
||||
|
|
@ -36,12 +36,12 @@ struct Euclidean_ring_tag : public Unique_factorization_domain_tag {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
Tag indicating that a type is a model of the `Field` concept.
|
||||
Tag indicating that a type is a model of the `Field` concept.
|
||||
|
||||
\cgalModels `DefaultConstructible`
|
||||
|
||||
\sa `Field`
|
||||
\sa `AlgebraicStructureTraits`
|
||||
\sa `Field`
|
||||
\sa `AlgebraicStructureTraits`
|
||||
|
||||
*/
|
||||
|
||||
|
|
@ -52,12 +52,12 @@ struct Field_tag : public Integral_domain_tag {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
Tag indicating that a type is a model of the `FieldWithKthRoot` concept.
|
||||
Tag indicating that a type is a model of the `FieldWithKthRoot` concept.
|
||||
|
||||
\cgalModels `DefaultConstructible`
|
||||
|
||||
\sa `FieldWithKthRoot`
|
||||
\sa `AlgebraicStructureTraits`
|
||||
\sa `FieldWithKthRoot`
|
||||
\sa `AlgebraicStructureTraits`
|
||||
|
||||
*/
|
||||
|
||||
|
|
@ -68,12 +68,12 @@ struct Field_with_kth_root_tag : public Field_with_sqrt_tag {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
Tag indicating that a type is a model of the `FieldWithRootOf` concept.
|
||||
Tag indicating that a type is a model of the `FieldWithRootOf` concept.
|
||||
|
||||
\cgalModels `DefaultConstructible`
|
||||
|
||||
\sa `FieldWithRootOf`
|
||||
\sa `AlgebraicStructureTraits`
|
||||
\sa `FieldWithRootOf`
|
||||
\sa `AlgebraicStructureTraits`
|
||||
|
||||
*/
|
||||
|
||||
|
|
@ -84,12 +84,12 @@ struct Field_with_root_of_tag : public Field_with_kth_root_tag {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
Tag indicating that a type is a model of the `FieldWithSqrt` concept.
|
||||
Tag indicating that a type is a model of the `FieldWithSqrt` concept.
|
||||
|
||||
\cgalModels `DefaultConstructible`
|
||||
|
||||
\sa `FieldWithSqrt`
|
||||
\sa `AlgebraicStructureTraits`
|
||||
\sa `FieldWithSqrt`
|
||||
\sa `AlgebraicStructureTraits`
|
||||
|
||||
*/
|
||||
|
||||
|
|
@ -100,12 +100,12 @@ struct Field_with_sqrt_tag : public Field_tag {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
Tag indicating that a type is a model of the `IntegralDomain` concept.
|
||||
Tag indicating that a type is a model of the `IntegralDomain` concept.
|
||||
|
||||
\cgalModels `DefaultConstructible`
|
||||
|
||||
\sa `IntegralDomain`
|
||||
\sa `AlgebraicStructureTraits`
|
||||
\sa `IntegralDomain`
|
||||
\sa `AlgebraicStructureTraits`
|
||||
|
||||
*/
|
||||
|
||||
|
|
@ -116,11 +116,11 @@ struct Integral_domain_tag : public Integral_domain_without_division_tag {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
Tag indicating that a type is a model of the `IntegralDomainWithoutDivision` concept.
|
||||
Tag indicating that a type is a model of the `IntegralDomainWithoutDivision` concept.
|
||||
|
||||
\cgalModels `DefaultConstructible`
|
||||
|
||||
\sa `IntegralDomainWithoutDivision`
|
||||
\sa `IntegralDomainWithoutDivision`
|
||||
|
||||
*/
|
||||
|
||||
|
|
@ -131,12 +131,12 @@ struct Integral_domain_without_division_tag {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
Tag indicating that a type is a model of the `UniqueFactorizationDomain` concept.
|
||||
Tag indicating that a type is a model of the `UniqueFactorizationDomain` concept.
|
||||
|
||||
\cgalModels `DefaultConstructible`
|
||||
|
||||
\sa `UniqueFactorizationDomain`
|
||||
\sa `AlgebraicStructureTraits`
|
||||
\sa `UniqueFactorizationDomain`
|
||||
\sa `AlgebraicStructureTraits`
|
||||
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -4,46 +4,46 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
An instance of `Coercion_traits` reflects the type coercion of the types
|
||||
<span class="textsc">A</span> and <span class="textsc">B</span>, it is symmetric in the two template arguments.
|
||||
An instance of `Coercion_traits` reflects the type coercion of the types
|
||||
<span class="textsc">A</span> and <span class="textsc">B</span>, it is symmetric in the two template arguments.
|
||||
|
||||
\sa `ExplicitInteroperable`
|
||||
\sa `ImplicitInteroperable`
|
||||
\sa `ExplicitInteroperable`
|
||||
\sa `ImplicitInteroperable`
|
||||
|
||||
*/
|
||||
template< typename A, typename B >
|
||||
struct Coercion_traits {
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Tag indicating whether the two types A and B are a model of `ExplicitInteroperable`
|
||||
Tag indicating whether the two types A and B are a model of `ExplicitInteroperable`
|
||||
|
||||
This is either `CGAL::Tag_true` or `CGAL::Tag_false`.
|
||||
*/
|
||||
typedef unspecified_type Are_explicit_interoperable;
|
||||
This is either `CGAL::Tag_true` or `CGAL::Tag_false`.
|
||||
*/
|
||||
typedef unspecified_type Are_explicit_interoperable;
|
||||
|
||||
/*!
|
||||
Tag indicating whether the two types A and B are a model of `ImplicitInteroperable`
|
||||
Tag indicating whether the two types A and B are a model of `ImplicitInteroperable`
|
||||
|
||||
This is either `CGAL::Tag_true` or `CGAL::Tag_false`.
|
||||
*/
|
||||
typedef unspecified_type Are_implicit_interoperable;
|
||||
This is either `CGAL::Tag_true` or `CGAL::Tag_false`.
|
||||
*/
|
||||
typedef unspecified_type Are_implicit_interoperable;
|
||||
|
||||
/*!
|
||||
The coercion type of `A` and `B`.
|
||||
The coercion type of `A` and `B`.
|
||||
|
||||
In case A and B are not `ExplicitInteroperable` this is undefined.
|
||||
*/
|
||||
typedef unspecified_type Type;
|
||||
In case A and B are not `ExplicitInteroperable` this is undefined.
|
||||
*/
|
||||
typedef unspecified_type Type;
|
||||
|
||||
/*!
|
||||
A model of the `AdaptableFunctor` concept, providing the conversion of `A` or `B` to `Type`.
|
||||
A model of the `AdaptableFunctor` concept, providing the conversion of `A` or `B` to `Type`.
|
||||
|
||||
In case A and B are not `ExplicitInteroperable` this is undefined.
|
||||
*/
|
||||
typedef unspecified_type Cast;
|
||||
In case A and B are not `ExplicitInteroperable` this is undefined.
|
||||
*/
|
||||
typedef unspecified_type Cast;
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
An instance of `Real_embeddable_traits` is a model of `RealEmbeddableTraits`, where <span class="textsc">T</span> is the associated type.
|
||||
An instance of `Real_embeddable_traits` is a model of `RealEmbeddableTraits`, where <span class="textsc">T</span> is the associated type.
|
||||
|
||||
\cgalModels `RealEmbeddableTraits`
|
||||
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The template function `abs()` returns the absolute value of a number.
|
||||
The template function `abs()` returns the absolute value of a number.
|
||||
|
||||
The function is defined if the argument type
|
||||
is a model of the `RealEmbeddable` concept.
|
||||
The function is defined if the argument type
|
||||
is a model of the `RealEmbeddable` concept.
|
||||
|
||||
\sa `RealEmbeddable`
|
||||
\sa `RealEmbeddableTraits_::Abs`
|
||||
\sa `RealEmbeddable`
|
||||
\sa `RealEmbeddableTraits_::Abs`
|
||||
|
||||
*/
|
||||
template <class NT> NT abs(const NT& x);
|
||||
|
|
@ -21,21 +21,21 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The template function `compare()` compares the first argument with respect to
|
||||
the second, i.e.\ it returns `CGAL::LARGER` if \f$ x\f$ is larger then \f$ y\f$.
|
||||
The template function `compare()` compares the first argument with respect to
|
||||
the second, i.e.\ it returns `CGAL::LARGER` if \f$ x\f$ is larger then \f$ y\f$.
|
||||
|
||||
In case the argument types `NT1` and `NT2` differ,
|
||||
`compare` is performed with the semantic of the type determined via
|
||||
`Coercion_traits`.
|
||||
The function is defined if this type
|
||||
is a model of the `RealEmbeddable` concept.
|
||||
In case the argument types `NT1` and `NT2` differ,
|
||||
`compare` is performed with the semantic of the type determined via
|
||||
`Coercion_traits`.
|
||||
The function is defined if this type
|
||||
is a model of the `RealEmbeddable` concept.
|
||||
|
||||
The `result_type` is convertible to `CGAL::Comparison_result`.
|
||||
The `result_type` is convertible to `CGAL::Comparison_result`.
|
||||
|
||||
\sa `RealEmbeddable`
|
||||
\sa `RealEmbeddableTraits_::Compare`
|
||||
\sa `RealEmbeddable`
|
||||
\sa `RealEmbeddableTraits_::Compare`
|
||||
*/
|
||||
template <class NT1, class NT2>
|
||||
template <class NT1, class NT2>
|
||||
result_type compare(const NT &x, const NT &y);
|
||||
|
||||
} /* namespace CGAL */
|
||||
|
|
@ -45,28 +45,28 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The function `div()` computes the integral quotient of division
|
||||
with remainder.
|
||||
The function `div()` computes the integral quotient of division
|
||||
with remainder.
|
||||
|
||||
In case the argument types `NT1` and `NT2` differ,
|
||||
the `result_type` is determined via `Coercion_traits`.
|
||||
In case the argument types `NT1` and `NT2` differ,
|
||||
the `result_type` is determined via `Coercion_traits`.
|
||||
|
||||
Thus, the `result_type` is well defined if `NT1` and `NT2`
|
||||
are a model of `ExplicitInteroperable`.
|
||||
Thus, the `result_type` is well defined if `NT1` and `NT2`
|
||||
are a model of `ExplicitInteroperable`.
|
||||
|
||||
The actual `div` is performed with the semantic of that type.
|
||||
The actual `div` is performed with the semantic of that type.
|
||||
|
||||
The function is defined if `result_type`
|
||||
is a model of the `EuclideanRing` concept.
|
||||
The function is defined if `result_type`
|
||||
is a model of the `EuclideanRing` concept.
|
||||
|
||||
\sa `EuclideanRing`
|
||||
\sa `AlgebraicStructureTraits_::Div`
|
||||
\sa `EuclideanRing`
|
||||
\sa `AlgebraicStructureTraits_::Div`
|
||||
\sa `CGAL::mod()`
|
||||
\sa `CGAL::div_mod()`
|
||||
|
||||
*/
|
||||
template< class NT1, class NT2>
|
||||
result_type
|
||||
template< class NT1, class NT2>
|
||||
result_type
|
||||
div(const NT1& x, const NT2& y);
|
||||
|
||||
} /* namespace CGAL */
|
||||
|
|
@ -76,32 +76,32 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
computes the quotient \f$ q\f$ and remainder \f$ r\f$, such that \f$ x = q*y + r\f$
|
||||
and \f$ r\f$ minimal with respect to the Euclidean Norm of the
|
||||
computes the quotient \f$ q\f$ and remainder \f$ r\f$, such that \f$ x = q*y + r\f$
|
||||
and \f$ r\f$ minimal with respect to the Euclidean Norm of the
|
||||
`result_type`.
|
||||
|
||||
The function `div_mod()` computes the integral quotient and remainder of
|
||||
division with remainder.
|
||||
The function `div_mod()` computes the integral quotient and remainder of
|
||||
division with remainder.
|
||||
|
||||
In case the argument types `NT1` and `NT2` differ,
|
||||
the `result_type` is determined via `Coercion_traits`.
|
||||
In case the argument types `NT1` and `NT2` differ,
|
||||
the `result_type` is determined via `Coercion_traits`.
|
||||
|
||||
Thus, the `result_type` is well defined if `NT1` and `NT2`
|
||||
are a model of `ExplicitInteroperable`.
|
||||
Thus, the `result_type` is well defined if `NT1` and `NT2`
|
||||
are a model of `ExplicitInteroperable`.
|
||||
|
||||
The actual `div_mod` is performed with the semantic of that type.
|
||||
The actual `div_mod` is performed with the semantic of that type.
|
||||
|
||||
The function is defined if `result_type`
|
||||
is a model of the `EuclideanRing` concept.
|
||||
The function is defined if `result_type`
|
||||
is a model of the `EuclideanRing` concept.
|
||||
|
||||
\sa `EuclideanRing`
|
||||
\sa `EuclideanRing`
|
||||
\sa `AlgebraicStructureTraits_::DivMod`
|
||||
\sa `CGAL::mod()`
|
||||
\sa `CGAL::div()`
|
||||
|
||||
*/
|
||||
template <class NT1, class NT2>
|
||||
void
|
||||
template <class NT1, class NT2>
|
||||
void
|
||||
div_mod(const NT1& x, const NT2& y, result_type& q, result_type& r);
|
||||
|
||||
} /* namespace CGAL */
|
||||
|
|
@ -111,24 +111,24 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The function `gcd()` computes the greatest common divisor of two values.
|
||||
The function `gcd()` computes the greatest common divisor of two values.
|
||||
|
||||
In case the argument types `NT1` and `NT2` differ,
|
||||
the `result_type` is determined via `Coercion_traits`.
|
||||
In case the argument types `NT1` and `NT2` differ,
|
||||
the `result_type` is determined via `Coercion_traits`.
|
||||
|
||||
Thus, the `result_type` is well defined if `NT1` and `NT2`
|
||||
are a model of `ExplicitInteroperable`.
|
||||
Thus, the `result_type` is well defined if `NT1` and `NT2`
|
||||
are a model of `ExplicitInteroperable`.
|
||||
|
||||
The actual `gcd` is performed with the semantic of that type.
|
||||
The actual `gcd` is performed with the semantic of that type.
|
||||
|
||||
The function is defined if `result_type`
|
||||
is a model of the `UniqueFactorizationDomain` concept.
|
||||
The function is defined if `result_type`
|
||||
is a model of the `UniqueFactorizationDomain` concept.
|
||||
|
||||
\sa `UniqueFactorizationDomain`
|
||||
\sa `AlgebraicStructureTraits_::Gcd`
|
||||
\sa `UniqueFactorizationDomain`
|
||||
\sa `AlgebraicStructureTraits_::Gcd`
|
||||
|
||||
*/
|
||||
template <class NT1, class NT2> result_type
|
||||
template <class NT1, class NT2> result_type
|
||||
gcd(const NT1& x, const NT2& y);
|
||||
|
||||
} /* namespace CGAL */
|
||||
|
|
@ -138,28 +138,28 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The function `integral_division()` (a.k.a.\ exact division or division without remainder)
|
||||
maps ring elements \f$ (x,y)\f$ to ring element \f$ z\f$ such that \f$ x = yz\f$ if such a \f$ z\f$
|
||||
exists (i.e.\ if \f$ x\f$ is divisible by \f$ y\f$). Otherwise the effect of invoking
|
||||
this operation is undefined. Since the ring represented is an integral domain,
|
||||
\f$ z\f$ is uniquely defined if it exists.
|
||||
The function `integral_division()` (a.k.a.\ exact division or division without remainder)
|
||||
maps ring elements \f$ (x,y)\f$ to ring element \f$ z\f$ such that \f$ x = yz\f$ if such a \f$ z\f$
|
||||
exists (i.e.\ if \f$ x\f$ is divisible by \f$ y\f$). Otherwise the effect of invoking
|
||||
this operation is undefined. Since the ring represented is an integral domain,
|
||||
\f$ z\f$ is uniquely defined if it exists.
|
||||
|
||||
In case the argument types `NT1` and `NT2` differ,
|
||||
the `result_type` is determined via `Coercion_traits`.
|
||||
In case the argument types `NT1` and `NT2` differ,
|
||||
the `result_type` is determined via `Coercion_traits`.
|
||||
|
||||
Thus, the `result_type` is well defined if `NT1` and `NT2`
|
||||
are a model of `ExplicitInteroperable`.
|
||||
Thus, the `result_type` is well defined if `NT1` and `NT2`
|
||||
are a model of `ExplicitInteroperable`.
|
||||
|
||||
The actual `integral_division` is performed with the semantic of that type.
|
||||
The actual `integral_division` is performed with the semantic of that type.
|
||||
|
||||
The function is defined if `result_type`
|
||||
is a model of the `IntegralDomain` concept.
|
||||
The function is defined if `result_type`
|
||||
is a model of the `IntegralDomain` concept.
|
||||
|
||||
\sa `IntegralDomain`
|
||||
\sa `AlgebraicStructureTraits_::IntegralDivision`
|
||||
\sa `IntegralDomain`
|
||||
\sa `AlgebraicStructureTraits_::IntegralDivision`
|
||||
|
||||
*/
|
||||
template <class NT1, class NT2> result_type
|
||||
template <class NT1, class NT2> result_type
|
||||
integral_division(const NT1& x, const NT2& y);
|
||||
|
||||
} /* namespace CGAL */
|
||||
|
|
@ -169,15 +169,15 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The function `inverse()` returns the inverse element with respect to multiplication.
|
||||
The function `inverse()` returns the inverse element with respect to multiplication.
|
||||
|
||||
The function is defined if the argument type
|
||||
is a model of the `Field` concept.
|
||||
The function is defined if the argument type
|
||||
is a model of the `Field` concept.
|
||||
|
||||
\pre \f$ x \neq0\f$.
|
||||
|
||||
\sa `Field`
|
||||
\sa `AlgebraicStructureTraits_::Inverse`
|
||||
\sa `Field`
|
||||
\sa `AlgebraicStructureTraits_::Inverse`
|
||||
|
||||
*/
|
||||
template <class NT> NT inverse(const NT& x);
|
||||
|
|
@ -189,14 +189,14 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The template function `is_negative()` determines if a value is negative or not.
|
||||
The function is defined if the argument type
|
||||
is a model of the `RealEmbeddable` concept.
|
||||
The template function `is_negative()` determines if a value is negative or not.
|
||||
The function is defined if the argument type
|
||||
is a model of the `RealEmbeddable` concept.
|
||||
|
||||
The `result_type` is convertible to `bool`.
|
||||
The `result_type` is convertible to `bool`.
|
||||
|
||||
\sa `RealEmbeddable`
|
||||
\sa `RealEmbeddableTraits_::IsNegative`
|
||||
\sa `RealEmbeddable`
|
||||
\sa `RealEmbeddableTraits_::IsNegative`
|
||||
|
||||
*/
|
||||
result_type is_negative(const NT& x);
|
||||
|
|
@ -208,15 +208,15 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The function `is_one()` determines if a value is equal to 1 or not.
|
||||
The function `is_one()` determines if a value is equal to 1 or not.
|
||||
|
||||
The function is defined if the argument type
|
||||
is a model of the `IntegralDomainWithoutDivision` concept.
|
||||
The function is defined if the argument type
|
||||
is a model of the `IntegralDomainWithoutDivision` concept.
|
||||
|
||||
The `result_type` is convertible to `bool`.
|
||||
The `result_type` is convertible to `bool`.
|
||||
|
||||
\sa `IntegralDomainWithoutDivision`
|
||||
\sa `AlgebraicStructureTraits_::IsOne`
|
||||
\sa `IntegralDomainWithoutDivision`
|
||||
\sa `AlgebraicStructureTraits_::IsOne`
|
||||
|
||||
*/
|
||||
template <class NT> result_type is_one(const NT& x);
|
||||
|
|
@ -228,14 +228,14 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The template function `is_positive()` determines if a value is positive or not.
|
||||
The function is defined if the argument type
|
||||
is a model of the `RealEmbeddable` concept.
|
||||
The template function `is_positive()` determines if a value is positive or not.
|
||||
The function is defined if the argument type
|
||||
is a model of the `RealEmbeddable` concept.
|
||||
|
||||
The `result_type` is convertible to `bool`.
|
||||
The `result_type` is convertible to `bool`.
|
||||
|
||||
\sa `RealEmbeddable`
|
||||
\sa `RealEmbeddableTraits_::IsPositive`
|
||||
\sa `RealEmbeddable`
|
||||
\sa `RealEmbeddableTraits_::IsPositive`
|
||||
|
||||
*/
|
||||
result_type is_positive(const NT& x);
|
||||
|
|
@ -247,18 +247,18 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
An ring element \f$ x\f$ is said to be a square iff there exists a ring element
|
||||
\f$ y\f$ such
|
||||
that \f$ x= y*y\f$. In case the ring is a `UniqueFactorizationDomain`,
|
||||
\f$ y\f$ is uniquely defined up to multiplication by units.
|
||||
An ring element \f$ x\f$ is said to be a square iff there exists a ring element
|
||||
\f$ y\f$ such
|
||||
that \f$ x= y*y\f$. In case the ring is a `UniqueFactorizationDomain`,
|
||||
\f$ y\f$ is uniquely defined up to multiplication by units.
|
||||
|
||||
The function `is_square()` is available if
|
||||
`Algebraic_structure_traits::Is_square` is not the `CGAL::Null_functor`.
|
||||
The function `is_square()` is available if
|
||||
`Algebraic_structure_traits::Is_square` is not the `CGAL::Null_functor`.
|
||||
|
||||
The `result_type` is convertible to `bool`.
|
||||
The `result_type` is convertible to `bool`.
|
||||
|
||||
\sa `UniqueFactorizationDomain`
|
||||
\sa `AlgebraicStructureTraits_::IsSquare`
|
||||
\sa `UniqueFactorizationDomain`
|
||||
\sa `AlgebraicStructureTraits_::IsSquare`
|
||||
|
||||
*/
|
||||
template <class NT> result_type is_square(const NT& x);
|
||||
|
|
@ -266,18 +266,18 @@ template <class NT> result_type is_square(const NT& x);
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
An ring element \f$ x\f$ is said to be a square iff there exists a ring element
|
||||
\f$ y\f$ such
|
||||
that \f$ x= y*y\f$. In case the ring is a `UniqueFactorizationDomain`,
|
||||
\f$ y\f$ is uniquely defined up to multiplication by units.
|
||||
An ring element \f$ x\f$ is said to be a square iff there exists a ring element
|
||||
\f$ y\f$ such
|
||||
that \f$ x= y*y\f$. In case the ring is a `UniqueFactorizationDomain`,
|
||||
\f$ y\f$ is uniquely defined up to multiplication by units.
|
||||
|
||||
The function `is_square()` is available if
|
||||
`Algebraic_structure_traits::Is_square` is not the `CGAL::Null_functor`.
|
||||
The function `is_square()` is available if
|
||||
`Algebraic_structure_traits::Is_square` is not the `CGAL::Null_functor`.
|
||||
|
||||
The `result_type` is convertible to `bool`.
|
||||
|
||||
\sa `UniqueFactorizationDomain`
|
||||
\sa `AlgebraicStructureTraits_::IsSquare`
|
||||
\sa `UniqueFactorizationDomain`
|
||||
\sa `AlgebraicStructureTraits_::IsSquare`
|
||||
|
||||
*/
|
||||
template <class NT> result_type is_square(const NT& x, NT& y);
|
||||
|
|
@ -289,18 +289,18 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The function `is_zero()` determines if a value is equal to 0 or not.
|
||||
The function `is_zero()` determines if a value is equal to 0 or not.
|
||||
|
||||
The function is defined if the argument type
|
||||
is a model of the `RealEmbeddable` or of
|
||||
the `IntegralDomainWithoutDivision` concept.
|
||||
The function is defined if the argument type
|
||||
is a model of the `RealEmbeddable` or of
|
||||
the `IntegralDomainWithoutDivision` concept.
|
||||
|
||||
The `result_type` is convertible to `bool`.
|
||||
The `result_type` is convertible to `bool`.
|
||||
|
||||
\sa `RealEmbeddable`
|
||||
\sa `RealEmbeddableTraits_::IsZero`
|
||||
\sa `IntegralDomainWithoutDivision`
|
||||
\sa `AlgebraicStructureTraits_::IsZero`
|
||||
\sa `RealEmbeddable`
|
||||
\sa `RealEmbeddableTraits_::IsZero`
|
||||
\sa `IntegralDomainWithoutDivision`
|
||||
\sa `AlgebraicStructureTraits_::IsZero`
|
||||
*/
|
||||
template <class NT> result_type is_zero(const NT& x);
|
||||
|
||||
|
|
@ -311,13 +311,13 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The function `kth_root()` returns the k-th root of a value.
|
||||
The function `kth_root()` returns the k-th root of a value.
|
||||
|
||||
The function is defined if the second argument type
|
||||
is a model of the `FieldWithKthRoot` concept.
|
||||
The function is defined if the second argument type
|
||||
is a model of the `FieldWithKthRoot` concept.
|
||||
|
||||
\sa `FieldWithKthRoot`
|
||||
\sa `AlgebraicStructureTraits_::KthRoot`
|
||||
\sa `FieldWithKthRoot`
|
||||
\sa `AlgebraicStructureTraits_::KthRoot`
|
||||
|
||||
*/
|
||||
template <class NT> NT kth_root(int k, const NT& x);
|
||||
|
|
@ -329,27 +329,27 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The function `mod()` computes the remainder of division with remainder.
|
||||
The function `mod()` computes the remainder of division with remainder.
|
||||
|
||||
In case the argument types `NT1` and `NT2` differ,
|
||||
the `result_type` is determined via `Coercion_traits`.
|
||||
In case the argument types `NT1` and `NT2` differ,
|
||||
the `result_type` is determined via `Coercion_traits`.
|
||||
|
||||
Thus, the `result_type` is well defined if `NT1` and `NT2`
|
||||
are a model of `ExplicitInteroperable`.
|
||||
Thus, the `result_type` is well defined if `NT1` and `NT2`
|
||||
are a model of `ExplicitInteroperable`.
|
||||
|
||||
The actual `mod` is performed with the semantic of that type.
|
||||
The actual `mod` is performed with the semantic of that type.
|
||||
|
||||
The function is defined if `result_type`
|
||||
is a model of the `EuclideanRing` concept.
|
||||
The function is defined if `result_type`
|
||||
is a model of the `EuclideanRing` concept.
|
||||
|
||||
\sa `EuclideanRing`
|
||||
\sa `AlgebraicStructureTraits_::DivMod`
|
||||
\sa `EuclideanRing`
|
||||
\sa `AlgebraicStructureTraits_::DivMod`
|
||||
\sa `CGAL::div_mod()`
|
||||
\sa `CGAL::div()`
|
||||
|
||||
*/
|
||||
template< class NT1, class NT2>
|
||||
result_type
|
||||
template< class NT1, class NT2>
|
||||
result_type
|
||||
mod(const NT1& x, const NT2& y);
|
||||
|
||||
} /* namespace CGAL */
|
||||
|
|
@ -363,19 +363,19 @@ returns the k-th real root of the univariate polynomial, which is
|
|||
defined by the iterator range, where begin refers to the constant
|
||||
term.
|
||||
|
||||
The function `root_of()` computes a real root of a square-free univariate
|
||||
polynomial.
|
||||
The function `root_of()` computes a real root of a square-free univariate
|
||||
polynomial.
|
||||
|
||||
The function is defined if the value type, `NT`,
|
||||
of the iterator range is a model of the `FieldWithRootOf` concept.
|
||||
The function is defined if the value type, `NT`,
|
||||
of the iterator range is a model of the `FieldWithRootOf` concept.
|
||||
|
||||
\pre The polynomial is square-free.
|
||||
|
||||
\sa `FieldWithRootOf`
|
||||
\sa `AlgebraicStructureTraits_::RootOf`
|
||||
\sa `FieldWithRootOf`
|
||||
\sa `AlgebraicStructureTraits_::RootOf`
|
||||
|
||||
*/
|
||||
template <class InputIterator> NT
|
||||
template <class InputIterator> NT
|
||||
root_of(int k, InputIterator begin, InputIterator end);
|
||||
|
||||
} /* namespace CGAL */
|
||||
|
|
@ -385,15 +385,15 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The template function `sign()` returns the sign of its argument.
|
||||
The template function `sign()` returns the sign of its argument.
|
||||
|
||||
The function is defined if the argument type
|
||||
is a model of the `RealEmbeddable` concept.
|
||||
The function is defined if the argument type
|
||||
is a model of the `RealEmbeddable` concept.
|
||||
|
||||
The `result_type` is convertible to `CGAL::Sign`.
|
||||
The `result_type` is convertible to `CGAL::Sign`.
|
||||
|
||||
\sa `RealEmbeddable`
|
||||
\sa `RealEmbeddableTraits_::Sgn`
|
||||
\sa `RealEmbeddable`
|
||||
\sa `RealEmbeddableTraits_::Sgn`
|
||||
|
||||
*/
|
||||
template <class NT> result_type sign(const NT& x);
|
||||
|
|
@ -405,13 +405,13 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The function `simplify()` may simplify a given object.
|
||||
The function `simplify()` may simplify a given object.
|
||||
|
||||
The function is defined if the argument type
|
||||
is a model of the `IntegralDomainWithoutDivision` concept.
|
||||
The function is defined if the argument type
|
||||
is a model of the `IntegralDomainWithoutDivision` concept.
|
||||
|
||||
\sa `IntegralDomainWithoutDivision`
|
||||
\sa `AlgebraicStructureTraits_::Simplify`
|
||||
\sa `IntegralDomainWithoutDivision`
|
||||
\sa `AlgebraicStructureTraits_::Simplify`
|
||||
|
||||
*/
|
||||
template <class NT> void simplify(const NT& x);
|
||||
|
|
@ -423,13 +423,13 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The function `sqrt()` returns the square root of a value.
|
||||
The function `sqrt()` returns the square root of a value.
|
||||
|
||||
The function is defined if the argument type
|
||||
is a model of the `FieldWithSqrt` concept.
|
||||
The function is defined if the argument type
|
||||
is a model of the `FieldWithSqrt` concept.
|
||||
|
||||
\sa `FieldWithSqrt`
|
||||
\sa `AlgebraicStructureTraits_::Sqrt`
|
||||
\sa `FieldWithSqrt`
|
||||
\sa `AlgebraicStructureTraits_::Sqrt`
|
||||
|
||||
*/
|
||||
template <class NT> NT sqrt(const NT& x);
|
||||
|
|
@ -441,13 +441,13 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The function `square()` returns the square of a number.
|
||||
The function `square()` returns the square of a number.
|
||||
|
||||
The function is defined if the argument type
|
||||
is a model of the `IntegralDomainWithoutDivision` concept.
|
||||
The function is defined if the argument type
|
||||
is a model of the `IntegralDomainWithoutDivision` concept.
|
||||
|
||||
\sa `IntegralDomainWithoutDivision`
|
||||
\sa `AlgebraicStructureTraits_::Square`
|
||||
\sa `IntegralDomainWithoutDivision`
|
||||
\sa `AlgebraicStructureTraits_::Square`
|
||||
|
||||
*/
|
||||
template <class NT> NT square(const NT& x);
|
||||
|
|
@ -466,13 +466,13 @@ number type (such as an instance of `CGAL::Lazy_exact_nt`), the double approxima
|
|||
returned might be affected by an exact computation internally triggered
|
||||
(that might have improved the double approximation).
|
||||
|
||||
The function is defined if the argument type
|
||||
is a model of the `RealEmbeddable` concept.
|
||||
The function is defined if the argument type
|
||||
is a model of the `RealEmbeddable` concept.
|
||||
|
||||
Remark: In order to control the quality of approximation one has to resort to methods that are specific to NT. There are no general guarantees whatsoever.
|
||||
Remark: In order to control the quality of approximation one has to resort to methods that are specific to NT. There are no general guarantees whatsoever.
|
||||
|
||||
\sa `RealEmbeddable`
|
||||
\sa `RealEmbeddableTraits_::ToDouble`
|
||||
\sa `RealEmbeddable`
|
||||
\sa `RealEmbeddableTraits_::ToDouble`
|
||||
|
||||
*/
|
||||
template <class NT> double to_double(const NT& x);
|
||||
|
|
@ -484,17 +484,17 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The template function `to_interval()` computes for a given real embeddable
|
||||
number \f$ x\f$ a double interval containing \f$ x\f$.
|
||||
This interval is represented by a `std::pair<double,double>`.
|
||||
The function is defined if the argument type
|
||||
is a model of the `RealEmbeddable` concept.
|
||||
The template function `to_interval()` computes for a given real embeddable
|
||||
number \f$ x\f$ a double interval containing \f$ x\f$.
|
||||
This interval is represented by a `std::pair<double,double>`.
|
||||
The function is defined if the argument type
|
||||
is a model of the `RealEmbeddable` concept.
|
||||
|
||||
\sa `RealEmbeddable`
|
||||
\sa `RealEmbeddableTraits_::ToInterval`
|
||||
\sa `RealEmbeddable`
|
||||
\sa `RealEmbeddableTraits_::ToInterval`
|
||||
|
||||
*/
|
||||
template <class NT>
|
||||
template <class NT>
|
||||
std::pair<double,double> to_interval(const NT& x);
|
||||
|
||||
} /* namespace CGAL */
|
||||
|
|
@ -504,14 +504,14 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The function `unit_part()` computes the unit part of a given ring
|
||||
element.
|
||||
The function `unit_part()` computes the unit part of a given ring
|
||||
element.
|
||||
|
||||
The function is defined if the argument type
|
||||
is a model of the `IntegralDomainWithoutDivision` concept.
|
||||
The function is defined if the argument type
|
||||
is a model of the `IntegralDomainWithoutDivision` concept.
|
||||
|
||||
\sa `IntegralDomainWithoutDivision`
|
||||
\sa `AlgebraicStructureTraits_::UnitPart`
|
||||
\sa `IntegralDomainWithoutDivision`
|
||||
\sa `AlgebraicStructureTraits_::UnitPart`
|
||||
|
||||
*/
|
||||
template <class NT> NT unit_part(const NT& x);
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ namespace AlgebraicStructureTraits_{
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
`AdaptableBinaryFunction` computes the integral quotient of division
|
||||
with remainder.
|
||||
`AdaptableBinaryFunction` computes the integral quotient of division
|
||||
with remainder.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
\sa `AlgebraicStructureTraits`
|
||||
\sa `AlgebraicStructureTraits_::Mod`
|
||||
|
|
@ -19,40 +19,40 @@ with remainder.
|
|||
class Div {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type first_argument;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type first_argument;
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type second_argument;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type second_argument;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
result_type operator()(first_argument_type x,
|
||||
second_argument_type y);
|
||||
*/
|
||||
result_type operator()(first_argument_type x,
|
||||
second_argument_type y);
|
||||
|
||||
/*!
|
||||
This operator is defined if `NT1` and `NT2` are `ExplicitInteroperable`
|
||||
with coercion type `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
template <class NT1, class NT2> result_type operator()(NT1 x, NT2 y);
|
||||
This operator is defined if `NT1` and `NT2` are `ExplicitInteroperable`
|
||||
with coercion type `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
template <class NT1, class NT2> result_type operator()(NT1 x, NT2 y);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,191 +5,191 @@ namespace AlgebraicStructureTraits_{
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
`AdaptableFunctor` computes both integral quotient and remainder
|
||||
of division with remainder. The quotient \f$ q\f$ and remainder \f$ r\f$ are computed
|
||||
such that \f$ x = q*y + r\f$ and \f$ |r| < |y|\f$ with respect to the proper integer norm of
|
||||
the represented ring.
|
||||
\cgalFootnote{For integers this norm is the absolute value.
|
||||
For univariate polynomials this norm is the degree.}
|
||||
In particular, \f$ r\f$ is chosen to be \f$ 0\f$ if possible.
|
||||
Moreover, we require \f$ q\f$ to be minimized with respect to the proper integer norm.
|
||||
`AdaptableFunctor` computes both integral quotient and remainder
|
||||
of division with remainder. The quotient \f$ q\f$ and remainder \f$ r\f$ are computed
|
||||
such that \f$ x = q*y + r\f$ and \f$ |r| < |y|\f$ with respect to the proper integer norm of
|
||||
the represented ring.
|
||||
\cgalFootnote{For integers this norm is the absolute value.
|
||||
For univariate polynomials this norm is the degree.}
|
||||
In particular, \f$ r\f$ is chosen to be \f$ 0\f$ if possible.
|
||||
Moreover, we require \f$ q\f$ to be minimized with respect to the proper integer norm.
|
||||
|
||||
Note that the last condition is needed to ensure a unique computation of the
|
||||
pair \f$ (q,r)\f$. However, an other option is to require minimality for \f$ |r|\f$,
|
||||
with the advantage that
|
||||
a <I>mod(x,y)</I> operation would return the unique representative of the
|
||||
residue class of \f$ x\f$ with respect to \f$ y\f$, e.g. \f$ mod(2,3)\f$ should return \f$ -1\f$.
|
||||
But this conflicts with nearly all current implementation
|
||||
of integer types. From there, we decided to stay conform with common
|
||||
implementations and require \f$ q\f$ to be computed as \f$ x/y\f$ rounded towards zero.
|
||||
Note that the last condition is needed to ensure a unique computation of the
|
||||
pair \f$ (q,r)\f$. However, an other option is to require minimality for \f$ |r|\f$,
|
||||
with the advantage that
|
||||
a <I>mod(x,y)</I> operation would return the unique representative of the
|
||||
residue class of \f$ x\f$ with respect to \f$ y\f$, e.g. \f$ mod(2,3)\f$ should return \f$ -1\f$.
|
||||
But this conflicts with nearly all current implementation
|
||||
of integer types. From there, we decided to stay conform with common
|
||||
implementations and require \f$ q\f$ to be computed as \f$ x/y\f$ rounded towards zero.
|
||||
|
||||
The following table illustrates the behavior for integers:
|
||||
The following table illustrates the behavior for integers:
|
||||
|
||||
<TABLE CELLSPACING=5 >
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
<TABLE CELLSPACING=5 >
|
||||
<TR><TD ALIGN=LEFT NOWRAP COLSPAN=4><HR>
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
x
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
y
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
q
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
r
|
||||
<TR><TD ALIGN=LEFT NOWRAP COLSPAN=4><HR>
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
1
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
2
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
2
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
1
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
1
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-1
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-1
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-2
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-2
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-1
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TR><TD ALIGN=LEFT NOWRAP COLSPAN=4><HR>
|
||||
</TABLE>
|
||||
<TABLE CELLSPACING=5 >
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
<TABLE CELLSPACING=5 >
|
||||
<TR><TD ALIGN=LEFT NOWRAP COLSPAN=4><HR>
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
x
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
y
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
q
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
r
|
||||
<TR><TD ALIGN=LEFT NOWRAP COLSPAN=4><HR>
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
1
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
2
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
2
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
1
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
1
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-1
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-1
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-2
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-2
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-1
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TR><TD ALIGN=LEFT NOWRAP COLSPAN=4><HR>
|
||||
</TABLE>
|
||||
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
<TABLE CELLSPACING=5 >
|
||||
<TR><TD ALIGN=LEFT NOWRAP COLSPAN=4><HR>
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
x
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
y
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
q
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
r
|
||||
<TR><TD ALIGN=LEFT NOWRAP COLSPAN=4><HR>
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-1
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
2
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
2
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
1
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
1
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-1
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-1
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-2
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-2
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
1
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TR><TD ALIGN=LEFT NOWRAP COLSPAN=4><HR>
|
||||
</TABLE>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
<TABLE CELLSPACING=5 >
|
||||
<TR><TD ALIGN=LEFT NOWRAP COLSPAN=4><HR>
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
x
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
y
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
q
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
r
|
||||
<TR><TD ALIGN=LEFT NOWRAP COLSPAN=4><HR>
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-1
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
2
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
2
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
1
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
1
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-1
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-1
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-2
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-2
|
||||
<TR>
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
-3
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
1
|
||||
<TD ALIGN=CENTER NOWRAP>
|
||||
0
|
||||
<TR><TD ALIGN=LEFT NOWRAP COLSPAN=4><HR>
|
||||
</TABLE>
|
||||
|
||||
</TABLE>
|
||||
</TABLE>
|
||||
|
||||
\cgalRefines `AdaptableFunctor`
|
||||
\cgalRefines `AdaptableFunctor`
|
||||
|
||||
\sa `AlgebraicStructureTraits`
|
||||
\sa `AlgebraicStructureTraits_::Mod`
|
||||
|
|
@ -200,56 +200,56 @@ r
|
|||
class DivMod {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Is void.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Is void.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type first_argument_type;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type first_argument_type;
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type second_argument_type;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type second_argument_type;
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type&`.
|
||||
*/
|
||||
typedef unspecified_type third_argument_type;
|
||||
Is `AlgebraicStructureTraits::Type&`.
|
||||
*/
|
||||
typedef unspecified_type third_argument_type;
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type&`.
|
||||
*/
|
||||
typedef unspecified_type fourth_argument_type;
|
||||
Is `AlgebraicStructureTraits::Type&`.
|
||||
*/
|
||||
typedef unspecified_type fourth_argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
computes the quotient \f$ q\f$ and remainder \f$ r\f$, such that \f$ x = q*y + r\f$
|
||||
and \f$ r\f$ minimal with respect to the Euclidean Norm on
|
||||
`Type`.
|
||||
*/
|
||||
result_type operator()( first_argument_type x,
|
||||
second_argument_type y,
|
||||
third_argument_type q,
|
||||
fourth_argument_type r);
|
||||
computes the quotient \f$ q\f$ and remainder \f$ r\f$, such that \f$ x = q*y + r\f$
|
||||
and \f$ r\f$ minimal with respect to the Euclidean Norm on
|
||||
`Type`.
|
||||
*/
|
||||
result_type operator()( first_argument_type x,
|
||||
second_argument_type y,
|
||||
third_argument_type q,
|
||||
fourth_argument_type r);
|
||||
|
||||
/*!
|
||||
This operator is defined if `NT1` and `NT2` are `ExplicitInteroperable`
|
||||
with coercion type `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
template <class NT1, class NT2> result_type
|
||||
operator()(NT1 x, NT2 y, third_argument_type q, fourth_argument_type r);
|
||||
This operator is defined if `NT1` and `NT2` are `ExplicitInteroperable`
|
||||
with coercion type `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
template <class NT1, class NT2> result_type
|
||||
operator()(NT1 x, NT2 y, third_argument_type q, fourth_argument_type r);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,18 +5,18 @@ namespace AlgebraicStructureTraits_{
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
`AdaptableBinaryFunction`,
|
||||
returns true if the first argument divides the second argument.
|
||||
`AdaptableBinaryFunction`,
|
||||
returns true if the first argument divides the second argument.
|
||||
|
||||
Integral division (a.k.a. exact division or division without remainder) maps
|
||||
ring elements \f$ (n,d)\f$ to ring element \f$ c\f$ such that \f$ n = dc\f$ if such a \f$ c\f$
|
||||
exists. In this case it is said that \f$ d\f$ divides \f$ n\f$.
|
||||
Integral division (a.k.a. exact division or division without remainder) maps
|
||||
ring elements \f$ (n,d)\f$ to ring element \f$ c\f$ such that \f$ n = dc\f$ if such a \f$ c\f$
|
||||
exists. In this case it is said that \f$ d\f$ divides \f$ n\f$.
|
||||
|
||||
This functor is required to provide two operators. The first operator takes two
|
||||
arguments and returns true if the first argument divides the second argument.
|
||||
The second operator returns \f$ c\f$ via the additional third argument.
|
||||
This functor is required to provide two operators. The first operator takes two
|
||||
arguments and returns true if the first argument divides the second argument.
|
||||
The second operator returns \f$ c\f$ via the additional third argument.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
\sa `AlgebraicStructureTraits`
|
||||
\sa `AlgebraicStructureTraits_::IntegralDivision`
|
||||
|
|
@ -26,46 +26,46 @@ The second operator returns \f$ c\f$ via the additional third argument.
|
|||
class Divides {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Boolean`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Is `AlgebraicStructureTraits::Boolean`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type first_argument;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type first_argument;
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type second_argument;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type second_argument;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Computes whether \f$ d\f$ divides \f$ n\f$.
|
||||
*/
|
||||
result_type operator()(first_argument_type d,
|
||||
second_argument_type n);
|
||||
Computes whether \f$ d\f$ divides \f$ n\f$.
|
||||
*/
|
||||
result_type operator()(first_argument_type d,
|
||||
second_argument_type n);
|
||||
|
||||
/*!
|
||||
|
||||
Computes whether \f$ d\f$ divides \f$ n\f$.
|
||||
Moreover it computes \f$ c\f$ if \f$ d\f$ divides \f$ n\f$,
|
||||
otherwise the value of \f$ c\f$ is undefined.
|
||||
Computes whether \f$ d\f$ divides \f$ n\f$.
|
||||
Moreover it computes \f$ c\f$ if \f$ d\f$ divides \f$ n\f$,
|
||||
otherwise the value of \f$ c\f$ is undefined.
|
||||
|
||||
*/
|
||||
result_type operator()(
|
||||
first_argument_type d,
|
||||
second_argument_type n,
|
||||
AlgebraicStructureTraits::Type& c);
|
||||
*/
|
||||
result_type operator()(
|
||||
first_argument_type d,
|
||||
second_argument_type n,
|
||||
AlgebraicStructureTraits::Type& c);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,19 +5,19 @@ namespace AlgebraicStructureTraits_{
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
`AdaptableBinaryFunction` providing the gcd.
|
||||
`AdaptableBinaryFunction` providing the gcd.
|
||||
|
||||
The greatest common divisor (\f$ gcd\f$) of ring elements \f$ x\f$ and \f$ y\f$ is the unique
|
||||
ring element \f$ d\f$ (up to a unit) with the property that any common divisor of
|
||||
\f$ x\f$ and \f$ y\f$ also divides \f$ d\f$. (In other words: \f$ d\f$ is the greatest lower bound
|
||||
of \f$ x\f$ and \f$ y\f$ in the partial order of divisibility.) We demand the \f$ gcd\f$ to be
|
||||
unit-normal (i.e.\ have unit part 1).
|
||||
The greatest common divisor (\f$ gcd\f$) of ring elements \f$ x\f$ and \f$ y\f$ is the unique
|
||||
ring element \f$ d\f$ (up to a unit) with the property that any common divisor of
|
||||
\f$ x\f$ and \f$ y\f$ also divides \f$ d\f$. (In other words: \f$ d\f$ is the greatest lower bound
|
||||
of \f$ x\f$ and \f$ y\f$ in the partial order of divisibility.) We demand the \f$ gcd\f$ to be
|
||||
unit-normal (i.e.\ have unit part 1).
|
||||
|
||||
\f$ gcd(0,0)\f$ is defined as \f$ 0\f$, since \f$ 0\f$ is the greatest element with respect
|
||||
to the partial order of divisibility. This is because an element \f$ a \in R\f$ is said to divide \f$ b \in R\f$, iff \f$ \exists r \in R\f$ such that \f$ a \cdot r = b\f$.
|
||||
Thus, \f$ 0\f$ is divided by every element of the Ring, in particular by itself.
|
||||
\f$ gcd(0,0)\f$ is defined as \f$ 0\f$, since \f$ 0\f$ is the greatest element with respect
|
||||
to the partial order of divisibility. This is because an element \f$ a \in R\f$ is said to divide \f$ b \in R\f$, iff \f$ \exists r \in R\f$ such that \f$ a \cdot r = b\f$.
|
||||
Thus, \f$ 0\f$ is divided by every element of the Ring, in particular by itself.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
\sa `AlgebraicStructureTraits`
|
||||
|
||||
|
|
@ -26,40 +26,40 @@ Thus, \f$ 0\f$ is divided by every element of the Ring, in particular by itself.
|
|||
class Gcd {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type first_argument;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type first_argument;
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type second_argument;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type second_argument;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
returns \f$ gcd(x,y)\f$.
|
||||
*/
|
||||
result_type operator()(first_argument_type x,
|
||||
second_argument_type y);
|
||||
returns \f$ gcd(x,y)\f$.
|
||||
*/
|
||||
result_type operator()(first_argument_type x,
|
||||
second_argument_type y);
|
||||
|
||||
/*!
|
||||
This operator is defined if `NT1` and `NT2` are `ExplicitInteroperable`
|
||||
with coercion type `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
template <class NT1, class NT2> result_type operator()(NT1 x, NT2 y);
|
||||
This operator is defined if `NT1` and `NT2` are `ExplicitInteroperable`
|
||||
with coercion type `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
template <class NT1, class NT2> result_type operator()(NT1 x, NT2 y);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,15 +5,15 @@ namespace AlgebraicStructureTraits_{
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
`AdaptableBinaryFunction` providing an integral division.
|
||||
`AdaptableBinaryFunction` providing an integral division.
|
||||
|
||||
Integral division (a.k.a. exact division or division without remainder) maps
|
||||
ring elements \f$ (x,y)\f$ to ring element \f$ z\f$ such that \f$ x = yz\f$ if such a \f$ z\f$
|
||||
exists (i.e.\ if \f$ x\f$ is divisible by \f$ y\f$). Otherwise the effect of invoking
|
||||
this operation is undefined. Since the ring represented is an integral domain,
|
||||
\f$ z\f$ is uniquely defined if it exists.
|
||||
Integral division (a.k.a. exact division or division without remainder) maps
|
||||
ring elements \f$ (x,y)\f$ to ring element \f$ z\f$ such that \f$ x = yz\f$ if such a \f$ z\f$
|
||||
exists (i.e.\ if \f$ x\f$ is divisible by \f$ y\f$). Otherwise the effect of invoking
|
||||
this operation is undefined. Since the ring represented is an integral domain,
|
||||
\f$ z\f$ is uniquely defined if it exists.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
\sa `AlgebraicStructureTraits`
|
||||
\sa `AlgebraicStructureTraits_::Divides`
|
||||
|
|
@ -23,40 +23,40 @@ this operation is undefined. Since the ring represented is an integral domain,
|
|||
class IntegralDivision {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type first_argument;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type first_argument;
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type second_argument;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type second_argument;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
returns \f$ x/y\f$, this is an integral division.
|
||||
*/
|
||||
result_type operator()(first_argument_type x,
|
||||
second_argument_type y);
|
||||
returns \f$ x/y\f$, this is an integral division.
|
||||
*/
|
||||
result_type operator()(first_argument_type x,
|
||||
second_argument_type y);
|
||||
|
||||
/*!
|
||||
This operator is defined if `NT1` and `NT2` are `ExplicitInteroperable`
|
||||
with coercion type `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
template <class NT1, class NT2> result_type operator()(NT1 x, NT2 y);
|
||||
This operator is defined if `NT1` and `NT2` are `ExplicitInteroperable`
|
||||
with coercion type `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
template <class NT1, class NT2> result_type operator()(NT1 x, NT2 y);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ namespace AlgebraicStructureTraits_{
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
`AdaptableUnaryFunction` providing the inverse element with
|
||||
respect to multiplication of a `Field`.
|
||||
`AdaptableUnaryFunction` providing the inverse element with
|
||||
respect to multiplication of a `Field`.
|
||||
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
|
||||
\sa `AlgebraicStructureTraits`
|
||||
|
||||
|
|
@ -17,30 +17,30 @@ respect to multiplication of a `Field`.
|
|||
class Inverse {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
returns the inverse element of \f$ x\f$ with respect to multiplication.
|
||||
\pre \f$ x \neq0\f$.
|
||||
returns the inverse element of \f$ x\f$ with respect to multiplication.
|
||||
\pre \f$ x \neq0\f$.
|
||||
|
||||
*/
|
||||
result_type operator()(argument_type x) const;
|
||||
*/
|
||||
result_type operator()(argument_type x) const;
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ namespace AlgebraicStructureTraits_{
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
`AdaptableUnaryFunction`,
|
||||
returns true in case the argument is the one of the ring.
|
||||
`AdaptableUnaryFunction`,
|
||||
returns true in case the argument is the one of the ring.
|
||||
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
|
||||
\sa `AlgebraicStructureTraits`
|
||||
|
||||
|
|
@ -17,29 +17,29 @@ returns true in case the argument is the one of the ring.
|
|||
class IsOne {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Boolean`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Is `AlgebraicStructureTraits::Boolean`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
returns true in case \f$ x\f$ is the one of the ring.
|
||||
*/
|
||||
result_type operator()(argument_type x);
|
||||
returns true in case \f$ x\f$ is the one of the ring.
|
||||
*/
|
||||
result_type operator()(argument_type x);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,15 +5,15 @@ namespace AlgebraicStructureTraits_{
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
`AdaptableBinaryFunction` that computes whether the first argument is a square.
|
||||
If the first argument is a square the second argument, which is taken by reference, contains the square root.
|
||||
Otherwise, the content of the second argument is undefined.
|
||||
`AdaptableBinaryFunction` that computes whether the first argument is a square.
|
||||
If the first argument is a square the second argument, which is taken by reference, contains the square root.
|
||||
Otherwise, the content of the second argument is undefined.
|
||||
|
||||
A ring element \f$ x\f$ is said to be a square iff there exists a ring element \f$ y\f$ such
|
||||
that \f$ x= y*y\f$. In case the ring is a `UniqueFactorizationDomain`,
|
||||
\f$ y\f$ is uniquely defined up to multiplication by units.
|
||||
A ring element \f$ x\f$ is said to be a square iff there exists a ring element \f$ y\f$ such
|
||||
that \f$ x= y*y\f$. In case the ring is a `UniqueFactorizationDomain`,
|
||||
\f$ y\f$ is uniquely defined up to multiplication by units.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
\sa `AlgebraicStructureTraits`
|
||||
|
||||
|
|
@ -22,42 +22,42 @@ that \f$ x= y*y\f$. In case the ring is a `UniqueFactorizationDomain`,
|
|||
class IsSquare {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Boolean`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Is `AlgebraicStructureTraits::Boolean`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type first_argument;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type first_argument;
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type&`.
|
||||
*/
|
||||
typedef unspecified_type second_argument;
|
||||
Is `AlgebraicStructureTraits::Type&`.
|
||||
*/
|
||||
typedef unspecified_type second_argument;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
returns <TT>true</TT> in case \f$ x\f$ is a square, i.e.\ \f$ x = y*y\f$.
|
||||
\post \f$ unit\_part(y) == 1\f$.
|
||||
returns <TT>true</TT> in case \f$ x\f$ is a square, i.e.\ \f$ x = y*y\f$.
|
||||
\post \f$ unit\_part(y) == 1\f$.
|
||||
|
||||
*/
|
||||
result_type operator()(first_argument_type x,
|
||||
second_argument_type y);
|
||||
*/
|
||||
result_type operator()(first_argument_type x,
|
||||
second_argument_type y);
|
||||
|
||||
/*!
|
||||
returns <TT>true</TT> in case \f$ x\f$ is a square.
|
||||
returns <TT>true</TT> in case \f$ x\f$ is a square.
|
||||
|
||||
*/
|
||||
result_type operator()(first_argument_type x);
|
||||
*/
|
||||
result_type operator()(first_argument_type x);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ namespace AlgebraicStructureTraits_{
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
`AdaptableUnaryFunction`, returns true in case the argument is the zero element of the ring.
|
||||
`AdaptableUnaryFunction`, returns true in case the argument is the zero element of the ring.
|
||||
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
|
||||
\sa `AlgebraicStructureTraits`
|
||||
\sa `RealEmbeddableTraits_::IsZero`
|
||||
|
|
@ -17,29 +17,29 @@ namespace AlgebraicStructureTraits_{
|
|||
class IsZero {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Boolean`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Is `AlgebraicStructureTraits::Boolean`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
returns true in case \f$ x\f$ is the zero element of the ring.
|
||||
*/
|
||||
result_type operator()(argument_type x) const;
|
||||
returns true in case \f$ x\f$ is the zero element of the ring.
|
||||
*/
|
||||
result_type operator()(argument_type x) const;
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ namespace AlgebraicStructureTraits_{
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
`AdaptableBinaryFunction` providing the k-th root.
|
||||
`AdaptableBinaryFunction` providing the k-th root.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
\sa `FieldWithRootOf`
|
||||
\sa `AlgebraicStructureTraits`
|
||||
|
|
@ -17,35 +17,35 @@ namespace AlgebraicStructureTraits_{
|
|||
class KthRoot {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
Is int.
|
||||
*/
|
||||
typedef unspecified_type first_argument;
|
||||
Is int.
|
||||
*/
|
||||
typedef unspecified_type first_argument;
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type second_argument;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type second_argument;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
returns the \f$ k\f$-th root of \f$ x\f$.
|
||||
\pre \f$ k \geq1\f$
|
||||
returns the \f$ k\f$-th root of \f$ x\f$.
|
||||
\pre \f$ k \geq1\f$
|
||||
|
||||
*/
|
||||
result_type operator()(int k, second_argument_type x);
|
||||
*/
|
||||
result_type operator()(int k, second_argument_type x);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ namespace AlgebraicStructureTraits_ {
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
`AdaptableBinaryFunction` computes the remainder of division with remainder.
|
||||
`AdaptableBinaryFunction` computes the remainder of division with remainder.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
\sa `AlgebraicStructureTraits`
|
||||
\sa `AlgebraicStructureTraits_::Div`
|
||||
|
|
@ -18,40 +18,40 @@ namespace AlgebraicStructureTraits_ {
|
|||
class Mod {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type first_argument;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type first_argument;
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type second_argument;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type second_argument;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
result_type operator()(first_argument_type x,
|
||||
second_argument_type y);
|
||||
*/
|
||||
result_type operator()(first_argument_type x,
|
||||
second_argument_type y);
|
||||
|
||||
/*!
|
||||
This operator is defined if `NT1` and `NT2` are `ExplicitInteroperable`
|
||||
with coercion type `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
template <class NT1, class NT2> result_type operator()(NT1 x, NT2 y);
|
||||
This operator is defined if `NT1` and `NT2` are `ExplicitInteroperable`
|
||||
with coercion type `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
template <class NT1, class NT2> result_type operator()(NT1 x, NT2 y);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ namespace AlgebraicStructureTraits_{
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
`AdaptableFunctor` computes a real root of a square-free univariate
|
||||
polynomial.
|
||||
`AdaptableFunctor` computes a real root of a square-free univariate
|
||||
polynomial.
|
||||
|
||||
\cgalRefines `AdaptableFunctor`
|
||||
\cgalRefines `AdaptableFunctor`
|
||||
|
||||
\sa `FieldWithRootOf`
|
||||
\sa `AlgebraicStructureTraits`
|
||||
|
|
@ -18,28 +18,28 @@ polynomial.
|
|||
class RootOf {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
returns the k-th real root of the univariate polynomial,
|
||||
which is defined by the iterator range,
|
||||
where begin refers to the constant term.
|
||||
\pre The polynomial is square-free.
|
||||
\pre The value type of the InputIterator is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
template<class InputIterator>
|
||||
result_type operator() (int k, InputIterator begin, InputIterator end);
|
||||
returns the k-th real root of the univariate polynomial,
|
||||
which is defined by the iterator range,
|
||||
where begin refers to the constant term.
|
||||
\pre The polynomial is square-free.
|
||||
\pre The value type of the InputIterator is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
template<class InputIterator>
|
||||
result_type operator() (int k, InputIterator begin, InputIterator end);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ namespace AlgebraicStructureTraits_{
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
This `AdaptableUnaryFunction` may simplify a given object.
|
||||
This `AdaptableUnaryFunction` may simplify a given object.
|
||||
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
|
||||
\sa `AlgebraicStructureTraits`
|
||||
|
||||
|
|
@ -16,28 +16,28 @@ This `AdaptableUnaryFunction` may simplify a given object.
|
|||
class Simplify {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Is void.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Is void.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
may simplify \f$ x\f$.
|
||||
*/
|
||||
result_type operator()(argument_type x);
|
||||
may simplify \f$ x\f$.
|
||||
*/
|
||||
result_type operator()(argument_type x);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ namespace AlgebraicStructureTraits_{
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
`AdaptableUnaryFunction` providing the square root.
|
||||
`AdaptableUnaryFunction` providing the square root.
|
||||
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
|
||||
\sa `AlgebraicStructureTraits`
|
||||
|
||||
|
|
@ -16,28 +16,28 @@ namespace AlgebraicStructureTraits_{
|
|||
class Sqrt {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
returns \f$ \sqrt{x}\f$.
|
||||
*/
|
||||
result_type operator()(argument_type x) const;
|
||||
returns \f$ \sqrt{x}\f$.
|
||||
*/
|
||||
result_type operator()(argument_type x) const;
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ namespace AlgebraicStructureTraits_{
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
`AdaptableUnaryFunction`, computing the square of the argument.
|
||||
`AdaptableUnaryFunction`, computing the square of the argument.
|
||||
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
|
||||
\sa `AlgebraicStructureTraits`
|
||||
|
||||
|
|
@ -16,28 +16,28 @@ namespace AlgebraicStructureTraits_{
|
|||
class Square {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
returns the square of \f$ x\f$.
|
||||
*/
|
||||
result_type operator()(argument_type x);
|
||||
returns the square of \f$ x\f$.
|
||||
*/
|
||||
result_type operator()(argument_type x);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,23 +5,23 @@ namespace AlgebraicStructureTraits_{
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
This `AdaptableUnaryFunction` computes the unit part of a given ring
|
||||
element.
|
||||
This `AdaptableUnaryFunction` computes the unit part of a given ring
|
||||
element.
|
||||
|
||||
The mathematical definition of unit part is as follows: Two ring elements \f$ a\f$
|
||||
and \f$ b\f$ are said to be associate if there exists an invertible ring element
|
||||
(i.e.\ a unit) \f$ u\f$ such that \f$ a = ub\f$. This defines an equivalence relation.
|
||||
We can distinguish exactly one element of every equivalence class as being
|
||||
unit normal. Then each element of a ring possesses a factorization into a unit
|
||||
(called its unit part) and a unit-normal ring element
|
||||
(called its unit normal associate).
|
||||
The mathematical definition of unit part is as follows: Two ring elements \f$ a\f$
|
||||
and \f$ b\f$ are said to be associate if there exists an invertible ring element
|
||||
(i.e.\ a unit) \f$ u\f$ such that \f$ a = ub\f$. This defines an equivalence relation.
|
||||
We can distinguish exactly one element of every equivalence class as being
|
||||
unit normal. Then each element of a ring possesses a factorization into a unit
|
||||
(called its unit part) and a unit-normal ring element
|
||||
(called its unit normal associate).
|
||||
|
||||
For the integers, the non-negative numbers are by convention unit normal,
|
||||
hence the unit-part of a non-zero integer is its sign. For a `Field`, every
|
||||
non-zero element is a unit and is its own unit part, its unit normal
|
||||
associate being one. The unit part of zero is, by convention, one.
|
||||
For the integers, the non-negative numbers are by convention unit normal,
|
||||
hence the unit-part of a non-zero integer is its sign. For a `Field`, every
|
||||
non-zero element is a unit and is its own unit part, its unit normal
|
||||
associate being one. The unit part of zero is, by convention, one.
|
||||
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
|
||||
\sa `AlgebraicStructureTraits`
|
||||
|
||||
|
|
@ -31,28 +31,28 @@ associate being one. The unit part of zero is, by convention, one.
|
|||
class UnitPart {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
Is `AlgebraicStructureTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
returns the unit part of \f$ x\f$.
|
||||
*/
|
||||
result_type operator()(argument_type x);
|
||||
returns the unit part of \f$ x\f$.
|
||||
*/
|
||||
result_type operator()(argument_type x);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
A model of `AlgebraicStructureTraits` reflects the algebraic structure
|
||||
of an associated type `Type`.
|
||||
A model of `AlgebraicStructureTraits` reflects the algebraic structure
|
||||
of an associated type `Type`.
|
||||
|
||||
Depending on the concepts that `Type` fulfills,
|
||||
it contains various functors and descriptive tags.
|
||||
Moreover it gives access to the several possible
|
||||
algebraic operations within that structure.
|
||||
Depending on the concepts that `Type` fulfills,
|
||||
it contains various functors and descriptive tags.
|
||||
Moreover it gives access to the several possible
|
||||
algebraic operations within that structure.
|
||||
|
||||
\sa `IntegralDomainWithoutDivision`
|
||||
\sa `IntegralDomain`
|
||||
|
|
@ -35,267 +35,267 @@ algebraic operations within that structure.
|
|||
class AlgebraicStructureTraits {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// A model of `AlgebraicStructureTraits` is supposed to provide:
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
The associated type.
|
||||
*/
|
||||
typedef unspecified_type Type;
|
||||
The associated type.
|
||||
*/
|
||||
typedef unspecified_type Type;
|
||||
|
||||
/*!
|
||||
Tag indicating the algebraic structure of the associated type.
|
||||
Tag indicating the algebraic structure of the associated type.
|
||||
|
||||
<TABLE CELLSPACING=5 >
|
||||
<TR><TD ALIGN=LEFT NOWRAP COLSPAN=2><HR>
|
||||
<TR>
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
Tag is:
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`Type` is model of:
|
||||
<TR><TD ALIGN=LEFT NOWRAP COLSPAN=2><HR>
|
||||
<TR>
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`CGAL::Null_tag`
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
no algebraic concept
|
||||
<TR>
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`CGAL::Integral_domain_without_division_tag`
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`IntegralDomainWithoutDivision`
|
||||
<TR>
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`CGAL::Integral_domain_tag`
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`IntegralDomain`
|
||||
<TR>
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`CGAL::Unique_factorization_domain_tag`
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`UniqueFactorizationDomain`
|
||||
<TR>
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`CGAL::Euclidean_ring_tag`
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`EuclideanRing`
|
||||
<TR>
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`CGAL::Field_tag`
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`Field`
|
||||
<TR>
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`CGAL::Field_with_sqrt_tag`
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`FieldWithSqrt`
|
||||
<TR>
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`CGAL::Field_with_kth_root_tag`
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`FieldWithKthRoot`
|
||||
<TR>
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`CGAL::Field_with_root_of_tag`
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`FieldWithRootOf`
|
||||
<TR><TD ALIGN=LEFT NOWRAP COLSPAN=2><HR>
|
||||
</TABLE>
|
||||
<TABLE CELLSPACING=5 >
|
||||
<TR><TD ALIGN=LEFT NOWRAP COLSPAN=2><HR>
|
||||
<TR>
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
Tag is:
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`Type` is model of:
|
||||
<TR><TD ALIGN=LEFT NOWRAP COLSPAN=2><HR>
|
||||
<TR>
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`CGAL::Null_tag`
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
no algebraic concept
|
||||
<TR>
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`CGAL::Integral_domain_without_division_tag`
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`IntegralDomainWithoutDivision`
|
||||
<TR>
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`CGAL::Integral_domain_tag`
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`IntegralDomain`
|
||||
<TR>
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`CGAL::Unique_factorization_domain_tag`
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`UniqueFactorizationDomain`
|
||||
<TR>
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`CGAL::Euclidean_ring_tag`
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`EuclideanRing`
|
||||
<TR>
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`CGAL::Field_tag`
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`Field`
|
||||
<TR>
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`CGAL::Field_with_sqrt_tag`
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`FieldWithSqrt`
|
||||
<TR>
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`CGAL::Field_with_kth_root_tag`
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`FieldWithKthRoot`
|
||||
<TR>
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`CGAL::Field_with_root_of_tag`
|
||||
<TD ALIGN=LEFT NOWRAP>
|
||||
`FieldWithRootOf`
|
||||
<TR><TD ALIGN=LEFT NOWRAP COLSPAN=2><HR>
|
||||
</TABLE>
|
||||
|
||||
*/
|
||||
typedef unspecified_type Algebraic_category;
|
||||
*/
|
||||
typedef unspecified_type Algebraic_category;
|
||||
|
||||
/*!
|
||||
Tag indicating whether `Type` is exact.
|
||||
Tag indicating whether `Type` is exact.
|
||||
|
||||
This is either `CGAL::Tag_true` or `CGAL::Tag_false`.
|
||||
This is either `CGAL::Tag_true` or `CGAL::Tag_false`.
|
||||
|
||||
An algebraic structure is considered exact, if all operations
|
||||
required by its concept are computed such that a comparison
|
||||
of two algebraic expressions is always correct.
|
||||
The exactness covers only those operations that are required by
|
||||
the algebraic structure concept.
|
||||
An algebraic structure is considered exact, if all operations
|
||||
required by its concept are computed such that a comparison
|
||||
of two algebraic expressions is always correct.
|
||||
The exactness covers only those operations that are required by
|
||||
the algebraic structure concept.
|
||||
|
||||
e.g. an exact `Field` may have a `Sqrt` functor that
|
||||
is not exact.
|
||||
e.g. an exact `Field` may have a `Sqrt` functor that
|
||||
is not exact.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Is_exact;
|
||||
*/
|
||||
typedef unspecified_type Is_exact;
|
||||
|
||||
/*!
|
||||
Tag indicating whether `Type` is numerical sensitive.
|
||||
Tag indicating whether `Type` is numerical sensitive.
|
||||
|
||||
This is either `CGAL::Tag_true` or `CGAL::Tag_false`.
|
||||
This is either `CGAL::Tag_true` or `CGAL::Tag_false`.
|
||||
|
||||
An algebraic structure is considered as numerically sensitive,
|
||||
if the performance of the type is sensitive to the condition
|
||||
number of an algorithm.
|
||||
An algebraic structure is considered as numerically sensitive,
|
||||
if the performance of the type is sensitive to the condition
|
||||
number of an algorithm.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Is_numerical_sensitive;
|
||||
*/
|
||||
typedef unspecified_type Is_numerical_sensitive;
|
||||
|
||||
/*!
|
||||
This type specifies the return type of the predicates provided
|
||||
by this traits. The type must be convertible to `bool` and
|
||||
typically the type indeed maps to `bool`. However, there are also
|
||||
cases such as interval arithmetic, in which it is `Uncertain<bool>`
|
||||
or some similar type.
|
||||
This type specifies the return type of the predicates provided
|
||||
by this traits. The type must be convertible to `bool` and
|
||||
typically the type indeed maps to `bool`. However, there are also
|
||||
cases such as interval arithmetic, in which it is `Uncertain<bool>`
|
||||
or some similar type.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Boolean;
|
||||
*/
|
||||
typedef unspecified_type Boolean;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Functors
|
||||
/// \name Functors
|
||||
/// In case a functor is not provided, it is set to `CGAL::Null_functor`.
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
A model of `AlgebraicStructureTraits_::IsZero`.
|
||||
A model of `AlgebraicStructureTraits_::IsZero`.
|
||||
|
||||
Required by the concept `IntegralDomainWithoutDivision`.
|
||||
In case `Type` is also model of `RealEmbeddable` this is a
|
||||
model of `RealEmbeddableTraits_::IsZero`.
|
||||
Required by the concept `IntegralDomainWithoutDivision`.
|
||||
In case `Type` is also model of `RealEmbeddable` this is a
|
||||
model of `RealEmbeddableTraits_::IsZero`.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Is_zero;
|
||||
*/
|
||||
typedef unspecified_type Is_zero;
|
||||
|
||||
/*!
|
||||
|
||||
A model of `AlgebraicStructureTraits_::IsOne`.
|
||||
A model of `AlgebraicStructureTraits_::IsOne`.
|
||||
|
||||
Required by the concept `IntegralDomainWithoutDivision`.
|
||||
Required by the concept `IntegralDomainWithoutDivision`.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Is_one;
|
||||
*/
|
||||
typedef unspecified_type Is_one;
|
||||
|
||||
/*!
|
||||
|
||||
A model of `AlgebraicStructureTraits_::Square`.
|
||||
A model of `AlgebraicStructureTraits_::Square`.
|
||||
|
||||
Required by the concept `IntegralDomainWithoutDivision`.
|
||||
Required by the concept `IntegralDomainWithoutDivision`.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Square;
|
||||
*/
|
||||
typedef unspecified_type Square;
|
||||
|
||||
/*!
|
||||
|
||||
A model of `AlgebraicStructureTraits_::Simplify`.
|
||||
A model of `AlgebraicStructureTraits_::Simplify`.
|
||||
|
||||
Required by the concept `IntegralDomainWithoutDivision`.
|
||||
Required by the concept `IntegralDomainWithoutDivision`.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Simplify;
|
||||
*/
|
||||
typedef unspecified_type Simplify;
|
||||
|
||||
/*!
|
||||
|
||||
A model of `AlgebraicStructureTraits_::UnitPart`.
|
||||
A model of `AlgebraicStructureTraits_::UnitPart`.
|
||||
|
||||
Required by the concept `IntegralDomainWithoutDivision`.
|
||||
Required by the concept `IntegralDomainWithoutDivision`.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Unit_part;
|
||||
*/
|
||||
typedef unspecified_type Unit_part;
|
||||
|
||||
/*!
|
||||
|
||||
A model of `AlgebraicStructureTraits_::IntegralDivision`.
|
||||
A model of `AlgebraicStructureTraits_::IntegralDivision`.
|
||||
|
||||
Required by the concept `IntegralDomain`.
|
||||
Required by the concept `IntegralDomain`.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Integral_division;
|
||||
*/
|
||||
typedef unspecified_type Integral_division;
|
||||
|
||||
/*!
|
||||
|
||||
A model of `AlgebraicStructureTraits_::Divides`.
|
||||
A model of `AlgebraicStructureTraits_::Divides`.
|
||||
|
||||
Required by the concept `IntegralDomain`.
|
||||
Required by the concept `IntegralDomain`.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Divides;
|
||||
*/
|
||||
typedef unspecified_type Divides;
|
||||
|
||||
/*!
|
||||
|
||||
A model of `AlgebraicStructureTraits_::IsSquare`.
|
||||
A model of `AlgebraicStructureTraits_::IsSquare`.
|
||||
|
||||
Required by the concept `IntegralDomainWithoutDivision`.
|
||||
Required by the concept `IntegralDomainWithoutDivision`.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Is_square;
|
||||
*/
|
||||
typedef unspecified_type Is_square;
|
||||
|
||||
/*!
|
||||
|
||||
A model of `AlgebraicStructureTraits_::Gcd`.
|
||||
A model of `AlgebraicStructureTraits_::Gcd`.
|
||||
|
||||
Required by the concept `UniqueFactorizationDomain`.
|
||||
Required by the concept `UniqueFactorizationDomain`.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Gcd;
|
||||
*/
|
||||
typedef unspecified_type Gcd;
|
||||
|
||||
/*!
|
||||
|
||||
A model of `AlgebraicStructureTraits_::Mod`.
|
||||
A model of `AlgebraicStructureTraits_::Mod`.
|
||||
|
||||
Required by the concept `EuclideanRing`.
|
||||
Required by the concept `EuclideanRing`.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Mod;
|
||||
*/
|
||||
typedef unspecified_type Mod;
|
||||
|
||||
/*!
|
||||
|
||||
A model of `AlgebraicStructureTraits_::Div`.
|
||||
A model of `AlgebraicStructureTraits_::Div`.
|
||||
|
||||
Required by the concept `EuclideanRing`.
|
||||
Required by the concept `EuclideanRing`.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Div;
|
||||
*/
|
||||
typedef unspecified_type Div;
|
||||
|
||||
/*!
|
||||
|
||||
A model of `AlgebraicStructureTraits_::DivMod`.
|
||||
A model of `AlgebraicStructureTraits_::DivMod`.
|
||||
|
||||
Required by the concept `EuclideanRing`.
|
||||
Required by the concept `EuclideanRing`.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Div_mod;
|
||||
*/
|
||||
typedef unspecified_type Div_mod;
|
||||
|
||||
/*!
|
||||
|
||||
A model of `AlgebraicStructureTraits_::Inverse`.
|
||||
A model of `AlgebraicStructureTraits_::Inverse`.
|
||||
|
||||
Required by the concept `Field`.
|
||||
Required by the concept `Field`.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Inverse;
|
||||
*/
|
||||
typedef unspecified_type Inverse;
|
||||
|
||||
/*!
|
||||
|
||||
A model of `AlgebraicStructureTraits_::Sqrt`.
|
||||
A model of `AlgebraicStructureTraits_::Sqrt`.
|
||||
|
||||
Required by the concept `FieldWithSqrt`.
|
||||
Required by the concept `FieldWithSqrt`.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Sqrt;
|
||||
*/
|
||||
typedef unspecified_type Sqrt;
|
||||
|
||||
/*!
|
||||
|
||||
A model of `AlgebraicStructureTraits_::KthRoot`.
|
||||
A model of `AlgebraicStructureTraits_::KthRoot`.
|
||||
|
||||
Required by the concept `FieldWithKthRoot`.
|
||||
Required by the concept `FieldWithKthRoot`.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Kth_root;
|
||||
*/
|
||||
typedef unspecified_type Kth_root;
|
||||
|
||||
/*!
|
||||
|
||||
A model of `AlgebraicStructureTraits_::RootOf`.
|
||||
A model of `AlgebraicStructureTraits_::RootOf`.
|
||||
|
||||
Required by the concept `FieldWithRootOf`.
|
||||
Required by the concept `FieldWithRootOf`.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Root_of;
|
||||
*/
|
||||
typedef unspecified_type Root_of;
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,20 +3,20 @@
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
A model of `Field` is an `IntegralDomain` in which every non-zero element
|
||||
has a multiplicative inverse.
|
||||
Thus, one can divide by any non-zero element.
|
||||
Hence division is defined for any divisor != 0.
|
||||
For a Field, we require this division operation to be available through
|
||||
operators / and /=.
|
||||
A model of `Field` is an `IntegralDomain` in which every non-zero element
|
||||
has a multiplicative inverse.
|
||||
Thus, one can divide by any non-zero element.
|
||||
Hence division is defined for any divisor != 0.
|
||||
For a Field, we require this division operation to be available through
|
||||
operators / and /=.
|
||||
|
||||
Moreover, `CGAL::Algebraic_structure_traits< Field >` is a model of
|
||||
`AlgebraicStructureTraits` providing:
|
||||
Moreover, `CGAL::Algebraic_structure_traits< Field >` is a model of
|
||||
`AlgebraicStructureTraits` providing:
|
||||
|
||||
- \link AlgebraicStructureTraits::Algebraic_category `CGAL::Algebraic_structure_traits< Field >::Algebraic_category` \endlink derived from `CGAL::Field_tag`
|
||||
- \link AlgebraicStructureTraits::Algebraic_category `CGAL::Algebraic_structure_traits< Field >::Algebraic_category` \endlink derived from `CGAL::Field_tag`
|
||||
- \link AlgebraicStructureTraits::Inverse `CGAL::Algebraic_structure_traits< FieldWithSqrt >::Inverse` \endlink which is a model of `AlgebraicStructureTraits_::Inverse`
|
||||
|
||||
\cgalRefines `IntegralDomain`
|
||||
\cgalRefines `IntegralDomain`
|
||||
|
||||
\sa `IntegralDomainWithoutDivision`
|
||||
\sa `IntegralDomain`
|
||||
|
|
@ -33,19 +33,19 @@ Moreover, `CGAL::Algebraic_structure_traits< Field >` is a model of
|
|||
class Field {
|
||||
public:
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
Field operator/(const Field &a, const Field &b);
|
||||
*/
|
||||
Field operator/(const Field &a, const Field &b);
|
||||
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
Field operator/=(const Field &b);
|
||||
*/
|
||||
Field operator/=(const Field &b);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,27 +2,27 @@
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
The concept `FieldNumberType` combines the requirements of the concepts
|
||||
`Field` and `RealEmbeddable`.
|
||||
A model of `FieldNumberType` can be used as a template parameter
|
||||
for Cartesian kernels.
|
||||
The concept `FieldNumberType` combines the requirements of the concepts
|
||||
`Field` and `RealEmbeddable`.
|
||||
A model of `FieldNumberType` can be used as a template parameter
|
||||
for Cartesian kernels.
|
||||
|
||||
\cgalRefines `Field`
|
||||
\cgalRefines `RealEmbeddable`
|
||||
\cgalRefines `Field`
|
||||
\cgalRefines `RealEmbeddable`
|
||||
|
||||
\cgalHasModel float
|
||||
\cgalHasModel double
|
||||
\cgalHasModel `CGAL::Gmpq`
|
||||
\cgalHasModel `CGAL::Interval_nt`
|
||||
\cgalHasModel float
|
||||
\cgalHasModel double
|
||||
\cgalHasModel `CGAL::Gmpq`
|
||||
\cgalHasModel `CGAL::Interval_nt`
|
||||
\cgalHasModel \ref CGAL::Interval_nt_advanced
|
||||
\cgalHasModel `CGAL::Lazy_exact_nt<FieldNumberType>`
|
||||
\cgalHasModel `CGAL::Quotient<RingNumberType>`
|
||||
\cgalHasModel `leda_rational`
|
||||
\cgalHasModel `leda_bigfloat`
|
||||
\cgalHasModel `leda_real`
|
||||
\cgalHasModel `CGAL::Lazy_exact_nt<FieldNumberType>`
|
||||
\cgalHasModel `CGAL::Quotient<RingNumberType>`
|
||||
\cgalHasModel `leda_rational`
|
||||
\cgalHasModel `leda_bigfloat`
|
||||
\cgalHasModel `leda_real`
|
||||
|
||||
\sa `RingNumberType`
|
||||
\sa `Kernel`
|
||||
\sa `RingNumberType`
|
||||
\sa `Kernel`
|
||||
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
A model of `FieldWithKthRoot` is a `FieldWithSqrt` that has operations to take k-th roots.
|
||||
A model of `FieldWithKthRoot` is a `FieldWithSqrt` that has operations to take k-th roots.
|
||||
|
||||
Moreover, `CGAL::Algebraic_structure_traits< FieldWithKthRoot >` is a model of `AlgebraicStructureTraits` providing:
|
||||
Moreover, `CGAL::Algebraic_structure_traits< FieldWithKthRoot >` is a model of `AlgebraicStructureTraits` providing:
|
||||
|
||||
- \link AlgebraicStructureTraits::Algebraic_category `CGAL::Algebraic_structure_traits< FieldWithKthRoot >::Algebraic_category` \endlink derived from `CGAL::Field_with_kth_root_tag`
|
||||
- \link AlgebraicStructureTraits::Kth_root `CGAL::Algebraic_structure_traits< FieldWithKthRoot >::Kth_root` \endlink which is a model of `AlgebraicStructureTraits_::KthRoot`
|
||||
|
||||
\cgalRefines `FieldWithSqrt`
|
||||
\cgalRefines `FieldWithSqrt`
|
||||
|
||||
\sa `IntegralDomainWithoutDivision`
|
||||
\sa `IntegralDomain`
|
||||
|
|
|
|||
|
|
@ -3,53 +3,53 @@
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
A model of `FractionTraits` is associated with a type `Type`.
|
||||
A model of `FractionTraits` is associated with a type `Type`.
|
||||
|
||||
In case the associated type is a `Fraction`, a model of `FractionTraits` provides the relevant functionality for decomposing and re-composing as well
|
||||
as the numerator and denominator type.
|
||||
In case the associated type is a `Fraction`, a model of `FractionTraits` provides the relevant functionality for decomposing and re-composing as well
|
||||
as the numerator and denominator type.
|
||||
|
||||
\cgalHasModel `CGAL::Fraction_traits<T>`
|
||||
|
||||
\sa `FractionTraits_::Decompose`
|
||||
\sa `FractionTraits_::Compose`
|
||||
\sa `FractionTraits_::CommonFactor`
|
||||
\sa `FractionTraits_::Decompose`
|
||||
\sa `FractionTraits_::Compose`
|
||||
\sa `FractionTraits_::CommonFactor`
|
||||
|
||||
*/
|
||||
class FractionTraits {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
The associated type
|
||||
*/
|
||||
typedef unspecified_type Type;
|
||||
The associated type
|
||||
*/
|
||||
typedef unspecified_type Type;
|
||||
|
||||
/*!
|
||||
|
||||
Tag indicating whether the associated type is a fraction and can be
|
||||
decomposed into a numerator and denominator.
|
||||
Tag indicating whether the associated type is a fraction and can be
|
||||
decomposed into a numerator and denominator.
|
||||
|
||||
This is either `CGAL::Tag_true` or `CGAL::Tag_false`.
|
||||
*/
|
||||
typedef unspecified_type Is_fraction;
|
||||
This is either `CGAL::Tag_true` or `CGAL::Tag_false`.
|
||||
*/
|
||||
typedef unspecified_type Is_fraction;
|
||||
|
||||
/*!
|
||||
The type to represent the numerator.
|
||||
This is undefined in case the associated type is not a fraction.
|
||||
*/
|
||||
typedef unspecified_type Numerator_type ;
|
||||
The type to represent the numerator.
|
||||
This is undefined in case the associated type is not a fraction.
|
||||
*/
|
||||
typedef unspecified_type Numerator_type ;
|
||||
|
||||
/*!
|
||||
The (simpler) type to represent the denominator.
|
||||
This is undefined in case the associated type is not a fraction.
|
||||
*/
|
||||
typedef unspecified_type Denominator_type;
|
||||
The (simpler) type to represent the denominator.
|
||||
This is undefined in case the associated type is not a fraction.
|
||||
*/
|
||||
typedef unspecified_type Denominator_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Functors
|
||||
/// \name Functors
|
||||
/// In case `Type` is not a `Fraction` all functors are `Null_functor`.
|
||||
/// @{
|
||||
|
||||
|
|
@ -81,27 +81,27 @@ namespace FractionTraits_ {
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
Functor decomposing a `Fraction` into its numerator and denominator.
|
||||
Functor decomposing a `Fraction` into its numerator and denominator.
|
||||
|
||||
\sa `Fraction`
|
||||
\sa `FractionTraits`
|
||||
\sa `FractionTraits_::Compose`
|
||||
\sa `FractionTraits_::CommonFactor`
|
||||
\sa `Fraction`
|
||||
\sa `FractionTraits`
|
||||
\sa `FractionTraits_::Compose`
|
||||
\sa `FractionTraits_::CommonFactor`
|
||||
|
||||
*/
|
||||
|
||||
class Decompose {
|
||||
public:
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
decompose \f$ f\f$ into numerator \f$ n\f$ and denominator \f$ d\f$.
|
||||
*/
|
||||
void operator()( FractionTraits::Type f,
|
||||
FractionTraits::Numerator_type & n,
|
||||
FractionTraits::Denominator_type & d);
|
||||
decompose \f$ f\f$ into numerator \f$ n\f$ and denominator \f$ d\f$.
|
||||
*/
|
||||
void operator()( FractionTraits::Type f,
|
||||
FractionTraits::Numerator_type & n,
|
||||
FractionTraits::Denominator_type & d);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
@ -111,47 +111,47 @@ FractionTraits::Denominator_type & d);
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
`AdaptableBinaryFunction`, returns the fraction of its arguments.
|
||||
`AdaptableBinaryFunction`, returns the fraction of its arguments.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
\sa `Fraction`
|
||||
\sa `FractionTraits`
|
||||
\sa `FractionTraits_::Decompose`
|
||||
\sa `FractionTraits_::CommonFactor`
|
||||
\sa `Fraction`
|
||||
\sa `FractionTraits`
|
||||
\sa `FractionTraits_::Decompose`
|
||||
\sa `FractionTraits_::CommonFactor`
|
||||
|
||||
*/
|
||||
|
||||
class Compose {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef FractionTraits::Type result_type;
|
||||
*/
|
||||
typedef FractionTraits::Type result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef FractionTraits::Numerator_type first_argument_type;
|
||||
*/
|
||||
typedef FractionTraits::Numerator_type first_argument_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef FractionTraits::Denominator_type second_argument_type;
|
||||
*/
|
||||
typedef FractionTraits::Denominator_type second_argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
return the fraction \f$ n/d\f$.
|
||||
*/
|
||||
result_type operator()(first_argument_type n, second_argument_type d);
|
||||
return the fraction \f$ n/d\f$.
|
||||
*/
|
||||
result_type operator()(first_argument_type n, second_argument_type d);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
@ -162,54 +162,54 @@ result_type operator()(first_argument_type n, second_argument_type d);
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
`AdaptableBinaryFunction`, finds great common factor of denominators.
|
||||
`AdaptableBinaryFunction`, finds great common factor of denominators.
|
||||
|
||||
This can be considered as a relaxed version of `AlgebraicStructureTraits_::Gcd`,
|
||||
this is needed because it is not guaranteed that `FractionTraits::Denominator_type` is a model of
|
||||
`UniqueFactorizationDomain`.
|
||||
This can be considered as a relaxed version of `AlgebraicStructureTraits_::Gcd`,
|
||||
this is needed because it is not guaranteed that `FractionTraits::Denominator_type` is a model of
|
||||
`UniqueFactorizationDomain`.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
\sa `Fraction`
|
||||
\sa `FractionTraits`
|
||||
\sa `FractionTraits_::Decompose`
|
||||
\sa `FractionTraits_::Compose`
|
||||
\sa `AlgebraicStructureTraits_::Gcd`
|
||||
\sa `Fraction`
|
||||
\sa `FractionTraits`
|
||||
\sa `FractionTraits_::Decompose`
|
||||
\sa `FractionTraits_::Compose`
|
||||
\sa `AlgebraicStructureTraits_::Gcd`
|
||||
|
||||
*/
|
||||
|
||||
class CommonFactor {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef FractionTraits::Denominator_type result_type;
|
||||
*/
|
||||
typedef FractionTraits::Denominator_type result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef FractionTraits::Denominator_type first_argument_type;
|
||||
*/
|
||||
typedef FractionTraits::Denominator_type first_argument_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef FractionTraits::Denominator_type second_argument_type;
|
||||
*/
|
||||
typedef FractionTraits::Denominator_type second_argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
return a great common factor of \f$ d1\f$ and \f$ d2\f$.
|
||||
return a great common factor of \f$ d1\f$ and \f$ d2\f$.
|
||||
|
||||
Note: <TT>operator()(0,0) = 0</TT>
|
||||
*/
|
||||
result_type operator()(first_argument_type d1, second_argument_type d2);
|
||||
Note: <TT>operator()(0,0) = 0</TT>
|
||||
*/
|
||||
result_type operator()(first_argument_type d1, second_argument_type d2);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,26 +3,26 @@
|
|||
\ingroup PkgAlgebraicFoundationsConcepts
|
||||
\cgalConcept
|
||||
|
||||
A model of the concept `FromDoubleConstructible` is required
|
||||
to be constructible from the type `double`.
|
||||
A model of the concept `FromDoubleConstructible` is required
|
||||
to be constructible from the type `double`.
|
||||
|
||||
In case the type is a model of `RealEmbeddable` too, for any double d
|
||||
the identity: `d == CGAL::to_double(T(d))`, is guaranteed.
|
||||
In case the type is a model of `RealEmbeddable` too, for any double d
|
||||
the identity: `d == CGAL::to_double(T(d))`, is guaranteed.
|
||||
|
||||
*/
|
||||
|
||||
class FromDoubleConstructible {
|
||||
public:
|
||||
|
||||
/// \name Creation
|
||||
/// \name Creation
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
conversion constructor from double.
|
||||
conversion constructor from double.
|
||||
|
||||
*/
|
||||
FromDoubleConstructible(const double& d);
|
||||
*/
|
||||
FromDoubleConstructible(const double& d);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,25 +3,25 @@
|
|||
\ingroup PkgAlgebraicFoundationsConcepts
|
||||
\cgalConcept
|
||||
|
||||
A model of the concept `FromIntConstructible` is required
|
||||
to be constructible from int.
|
||||
A model of the concept `FromIntConstructible` is required
|
||||
to be constructible from int.
|
||||
|
||||
\cgalHasModel int
|
||||
\cgalHasModel long
|
||||
\cgalHasModel double
|
||||
\cgalHasModel int
|
||||
\cgalHasModel long
|
||||
\cgalHasModel double
|
||||
|
||||
*/
|
||||
|
||||
class FromIntConstructible {
|
||||
public:
|
||||
|
||||
/// \name Creation
|
||||
/// \name Creation
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
FromIntConstructible(int& i);
|
||||
*/
|
||||
FromIntConstructible(int& i);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,18 +3,18 @@
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
A model of this concepts represents numbers that are embeddable on the real
|
||||
axis. The type obeys the algebraic structure and compares two values according
|
||||
to the total order of the real numbers.
|
||||
A model of this concepts represents numbers that are embeddable on the real
|
||||
axis. The type obeys the algebraic structure and compares two values according
|
||||
to the total order of the real numbers.
|
||||
|
||||
Moreover, `CGAL::Real_embeddable_traits< RealEmbeddable >` is a model of
|
||||
`RealEmbeddableTraits`
|
||||
Moreover, `CGAL::Real_embeddable_traits< RealEmbeddable >` is a model of
|
||||
`RealEmbeddableTraits`
|
||||
|
||||
with:
|
||||
with:
|
||||
|
||||
- \link RealEmbeddableTraits::Is_real_embeddable `CGAL::Real_embeddable_traits< RealEmbeddable >::Is_real_embeddable` \endlink set to `Tag_true`
|
||||
- \link RealEmbeddableTraits::Is_real_embeddable `CGAL::Real_embeddable_traits< RealEmbeddable >::Is_real_embeddable` \endlink set to `Tag_true`
|
||||
|
||||
and functors :
|
||||
and functors :
|
||||
|
||||
- \link RealEmbeddableTraits::Is_zero `CGAL::Real_embeddable_traits< RealEmbeddable >::Is_zero` \endlink which is a model of `RealEmbeddableTraits_::IsZero`
|
||||
|
||||
|
|
@ -32,14 +32,14 @@ and functors :
|
|||
|
||||
- \link RealEmbeddableTraits::To_interval `CGAL::Real_embeddable_traits< RealEmbeddable >::To_interval` \endlink which is a model of `RealEmbeddableTraits_::ToInterval`
|
||||
|
||||
Remark:
|
||||
Remark:
|
||||
|
||||
If a number type is a model of both `IntegralDomainWithoutDivision` and
|
||||
`RealEmbeddable`, it follows that the ring represented by such a number type
|
||||
is a sub-ring of the real numbers and hence has characteristic zero.
|
||||
If a number type is a model of both `IntegralDomainWithoutDivision` and
|
||||
`RealEmbeddable`, it follows that the ring represented by such a number type
|
||||
is a sub-ring of the real numbers and hence has characteristic zero.
|
||||
|
||||
\cgalRefines `EqualityComparable`
|
||||
\cgalRefines `LessThanComparable`
|
||||
\cgalRefines `LessThanComparable`
|
||||
|
||||
\sa `RealEmbeddableTraits`
|
||||
|
||||
|
|
@ -48,47 +48,47 @@ is a sub-ring of the real numbers and hence has characteristic zero.
|
|||
class RealEmbeddable {
|
||||
public:
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
bool operator==(const RealEmbeddable &a,
|
||||
const RealEmbeddable &b);
|
||||
*/
|
||||
bool operator==(const RealEmbeddable &a,
|
||||
const RealEmbeddable &b);
|
||||
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
bool operator!=(const RealEmbeddable &a,
|
||||
const RealEmbeddable &b);
|
||||
*/
|
||||
bool operator!=(const RealEmbeddable &a,
|
||||
const RealEmbeddable &b);
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
bool operator< (const RealEmbeddable &a,
|
||||
const RealEmbeddable &b);
|
||||
*/
|
||||
bool operator< (const RealEmbeddable &a,
|
||||
const RealEmbeddable &b);
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
bool operator<=(const RealEmbeddable &a,
|
||||
const RealEmbeddable &b);
|
||||
*/
|
||||
bool operator<=(const RealEmbeddable &a,
|
||||
const RealEmbeddable &b);
|
||||
|
||||
/*!
|
||||
|
||||
|
||||
*/
|
||||
bool operator> (const RealEmbeddable &a,
|
||||
const RealEmbeddable &b);
|
||||
*/
|
||||
bool operator> (const RealEmbeddable &a,
|
||||
const RealEmbeddable &b);
|
||||
|
||||
/*!
|
||||
|
||||
\relates RealEmbeddable
|
||||
*/
|
||||
bool operator>=(const RealEmbeddable &a,
|
||||
const RealEmbeddable &b);
|
||||
\relates RealEmbeddable
|
||||
*/
|
||||
bool operator>=(const RealEmbeddable &a,
|
||||
const RealEmbeddable &b);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ namespace RealEmbeddableTraits_ {
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
`AdaptableUnaryFunction` computes the absolute value of a number.
|
||||
`AdaptableUnaryFunction` computes the absolute value of a number.
|
||||
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
|
||||
\sa `RealEmbeddableTraits`
|
||||
|
||||
|
|
@ -16,28 +16,28 @@ namespace RealEmbeddableTraits_ {
|
|||
class Abs {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Is `RealEmbeddableTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Is `RealEmbeddableTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
Is `RealEmbeddableTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
Is `RealEmbeddableTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
computes the absolute value of \f$ x\f$.
|
||||
*/
|
||||
result_type operator()(argument_type x);
|
||||
computes the absolute value of \f$ x\f$.
|
||||
*/
|
||||
result_type operator()(argument_type x);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ namespace RealEmbeddableTraits_ {
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
`AdaptableBinaryFunction` compares two real embeddable numbers.
|
||||
`AdaptableBinaryFunction` compares two real embeddable numbers.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
\sa `RealEmbeddableTraits`
|
||||
|
||||
|
|
@ -16,43 +16,43 @@ namespace RealEmbeddableTraits_ {
|
|||
class Compare {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Type convertible to `CGAL::Comparison_result`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Type convertible to `CGAL::Comparison_result`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
Is `RealEmbeddableTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type first_argument_type;
|
||||
Is `RealEmbeddableTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type first_argument_type;
|
||||
|
||||
/*!
|
||||
Is `RealEmbeddableTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type second_argument_type;
|
||||
Is `RealEmbeddableTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type second_argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
compares \f$ x\f$ with respect to \f$ y\f$.
|
||||
*/
|
||||
result_type operator()(first_argument_type x,
|
||||
second_argument_type y);
|
||||
compares \f$ x\f$ with respect to \f$ y\f$.
|
||||
*/
|
||||
result_type operator()(first_argument_type x,
|
||||
second_argument_type y);
|
||||
|
||||
/*!
|
||||
|
||||
This operator is defined if `NT1` and `NT2` are
|
||||
`ExplicitInteroperable` with coercion type
|
||||
`RealEmbeddableTraits::Type`.
|
||||
*/
|
||||
template <class NT1, class NT2>
|
||||
result_type operator()(NT1 x, NT2 y);
|
||||
This operator is defined if `NT1` and `NT2` are
|
||||
`ExplicitInteroperable` with coercion type
|
||||
`RealEmbeddableTraits::Type`.
|
||||
*/
|
||||
template <class NT1, class NT2>
|
||||
result_type operator()(NT1 x, NT2 y);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ namespace RealEmbeddableTraits_ {
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
`AdaptableUnaryFunction`, returns true in case the argument is negative.
|
||||
`AdaptableUnaryFunction`, returns true in case the argument is negative.
|
||||
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
|
||||
\sa `RealEmbeddableTraits`
|
||||
|
||||
|
|
@ -16,28 +16,28 @@ namespace RealEmbeddableTraits_ {
|
|||
class IsNegative {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Type convertible to `bool`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Type convertible to `bool`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
Is `RealEmbeddableTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
Is `RealEmbeddableTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
returns true in case \f$ x\f$ is negative.
|
||||
*/
|
||||
result_type operator()(argument_type x);
|
||||
returns true in case \f$ x\f$ is negative.
|
||||
*/
|
||||
result_type operator()(argument_type x);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ namespace RealEmbeddableTraits_ {
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
`AdaptableUnaryFunction`, returns true in case the argument is positive.
|
||||
`AdaptableUnaryFunction`, returns true in case the argument is positive.
|
||||
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
|
||||
\sa `RealEmbeddableTraits`
|
||||
|
||||
|
|
@ -16,28 +16,28 @@ namespace RealEmbeddableTraits_ {
|
|||
class IsPositive {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Type convertible to `bool`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Type convertible to `bool`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
Is `RealEmbeddableTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
Is `RealEmbeddableTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
returns true in case \f$ x\f$ is positive.
|
||||
*/
|
||||
result_type operator()(argument_type x);
|
||||
returns true in case \f$ x\f$ is positive.
|
||||
*/
|
||||
result_type operator()(argument_type x);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ namespace RealEmbeddableTraits_ {
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
`AdaptableUnaryFunction`, returns true in case the argument is 0.
|
||||
`AdaptableUnaryFunction`, returns true in case the argument is 0.
|
||||
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
|
||||
\sa `RealEmbeddableTraits`
|
||||
\sa `AlgebraicStructureTraits_::IsZero`
|
||||
|
|
@ -17,29 +17,29 @@ namespace RealEmbeddableTraits_ {
|
|||
class IsZero {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Type convertible to `bool`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Type convertible to `bool`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
Is `RealEmbeddableTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
Is `RealEmbeddableTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
returns true in case \f$ x\f$ is the zero element of the ring.
|
||||
*/
|
||||
result_type operator()(argument_type x);
|
||||
returns true in case \f$ x\f$ is the zero element of the ring.
|
||||
*/
|
||||
result_type operator()(argument_type x);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ namespace RealEmbeddableTraits_ {
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
This `AdaptableUnaryFunction` computes the sign of a real embeddable number.
|
||||
This `AdaptableUnaryFunction` computes the sign of a real embeddable number.
|
||||
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
|
||||
\sa `RealEmbeddableTraits`
|
||||
|
||||
|
|
@ -16,28 +16,28 @@ This `AdaptableUnaryFunction` computes the sign of a real embeddable number.
|
|||
class Sgn {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Type convertible to `CGAL::Sign`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Type convertible to `CGAL::Sign`.
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
Is `RealEmbeddableTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
Is `RealEmbeddableTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Computes the sign of \f$ x\f$.
|
||||
*/
|
||||
result_type operator()(argument_type x);
|
||||
Computes the sign of \f$ x\f$.
|
||||
*/
|
||||
result_type operator()(argument_type x);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@ namespace RealEmbeddableTraits_ {
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
`AdaptableUnaryFunction` computes a double approximation of a real
|
||||
embeddable number.
|
||||
`AdaptableUnaryFunction` computes a double approximation of a real
|
||||
embeddable number.
|
||||
|
||||
Remark: In order to control the quality of approximation one has to resort
|
||||
to methods that are specific to NT. There are no general guarantees whatsoever.
|
||||
Remark: In order to control the quality of approximation one has to resort
|
||||
to methods that are specific to NT. There are no general guarantees whatsoever.
|
||||
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
|
||||
\sa `RealEmbeddableTraits`
|
||||
|
||||
|
|
@ -20,28 +20,28 @@ to methods that are specific to NT. There are no general guarantees whatsoever.
|
|||
class ToDouble {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
The result type.
|
||||
*/
|
||||
The result type.
|
||||
*/
|
||||
typedef double result_type;
|
||||
|
||||
/*!
|
||||
Is `RealEmbeddableTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
Is `RealEmbeddableTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
computes a double approximation of a real embeddable number.
|
||||
*/
|
||||
result_type operator()(argument_type x);
|
||||
computes a double approximation of a real embeddable number.
|
||||
*/
|
||||
result_type operator()(argument_type x);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ namespace RealEmbeddableTraits_ {
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
`AdaptableUnaryFunction` computes for a given real embeddable
|
||||
number \f$ x\f$ a double interval containing \f$ x\f$.
|
||||
This interval is represented by `std::pair<double,double>`.
|
||||
`AdaptableUnaryFunction` computes for a given real embeddable
|
||||
number \f$ x\f$ a double interval containing \f$ x\f$.
|
||||
This interval is represented by `std::pair<double,double>`.
|
||||
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
|
||||
\sa `RealEmbeddableTraits`
|
||||
|
||||
|
|
@ -18,28 +18,28 @@ This interval is represented by `std::pair<double,double>`.
|
|||
class ToInterval {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
The result type.
|
||||
*/
|
||||
*/
|
||||
typedef std::pair<double,double> result_type;
|
||||
|
||||
/*!
|
||||
Is `RealEmbeddableTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
Is `RealEmbeddableTraits::Type`.
|
||||
*/
|
||||
typedef unspecified_type argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
computes a double interval containing \f$ x\f$.
|
||||
*/
|
||||
result_type operator()(argument_type x);
|
||||
computes a double interval containing \f$ x\f$.
|
||||
*/
|
||||
result_type operator()(argument_type x);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||
\cgalConcept
|
||||
|
||||
A model of `RealEmbeddableTraits` is associated to a number type
|
||||
`Type` and reflects the properties of this type with respect
|
||||
to the concept `RealEmbeddable`.
|
||||
A model of `RealEmbeddableTraits` is associated to a number type
|
||||
`Type` and reflects the properties of this type with respect
|
||||
to the concept `RealEmbeddable`.
|
||||
|
||||
\cgalHasModel `CGAL::Real_embeddable_traits<T>`
|
||||
*/
|
||||
|
|
@ -13,55 +13,55 @@ to the concept `RealEmbeddable`.
|
|||
class RealEmbeddableTraits {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// A model of `RealEmbeddableTraits` is supposed to provide:
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
The associated number type.
|
||||
*/
|
||||
typedef unspecified_type Type;
|
||||
The associated number type.
|
||||
*/
|
||||
typedef unspecified_type Type;
|
||||
|
||||
/*!
|
||||
Tag indicating whether the associated type is real embeddable.
|
||||
Tag indicating whether the associated type is real embeddable.
|
||||
|
||||
This is either \link Tag_true `Tag_true`\endlink or \link Tag_false `Tag_false`\endlink.
|
||||
*/
|
||||
typedef unspecified_type Is_real_embeddable;
|
||||
This is either \link Tag_true `Tag_true`\endlink or \link Tag_false `Tag_false`\endlink.
|
||||
*/
|
||||
typedef unspecified_type Is_real_embeddable;
|
||||
|
||||
/*!
|
||||
This type specifies the return type of the predicates provided
|
||||
by this traits. The type must be convertible to `bool` and
|
||||
typically the type indeed maps to `bool`. However, there are also
|
||||
cases such as interval arithmetic, in which it is `Uncertain<bool>`
|
||||
or some similar type.
|
||||
This type specifies the return type of the predicates provided
|
||||
by this traits. The type must be convertible to `bool` and
|
||||
typically the type indeed maps to `bool`. However, there are also
|
||||
cases such as interval arithmetic, in which it is `Uncertain<bool>`
|
||||
or some similar type.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Boolean;
|
||||
*/
|
||||
typedef unspecified_type Boolean;
|
||||
|
||||
/*!
|
||||
This type specifies the return type of the `Sgn` functor.
|
||||
The type must be convertible to `CGAL::Sign` and
|
||||
typically the type indeed maps to `CGAL::Sign`. However, there are also
|
||||
cases such as interval arithmetic, in which it is `Uncertain<CGAL::Sign>`
|
||||
or some similar type.
|
||||
This type specifies the return type of the `Sgn` functor.
|
||||
The type must be convertible to `CGAL::Sign` and
|
||||
typically the type indeed maps to `CGAL::Sign`. However, there are also
|
||||
cases such as interval arithmetic, in which it is `Uncertain<CGAL::Sign>`
|
||||
or some similar type.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Sign;
|
||||
*/
|
||||
typedef unspecified_type Sign;
|
||||
|
||||
/*!
|
||||
This type specifies the return type of the `Compare` functor.
|
||||
The type must be convertible to `CGAL::Comparison_result` and
|
||||
typically the type indeed maps to `CGAL::Comparison_result`. However, there are also
|
||||
cases such as interval arithmetic, in which it is `Uncertain<CGAL::Comparison_result>`
|
||||
or some similar type.
|
||||
This type specifies the return type of the `Compare` functor.
|
||||
The type must be convertible to `CGAL::Comparison_result` and
|
||||
typically the type indeed maps to `CGAL::Comparison_result`. However, there are also
|
||||
cases such as interval arithmetic, in which it is `Uncertain<CGAL::Comparison_result>`
|
||||
or some similar type.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Comparison_result;
|
||||
*/
|
||||
typedef unspecified_type Comparison_result;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Functors
|
||||
/// \name Functors
|
||||
/// In case the associated type is `RealEmbeddable` all functors are
|
||||
/// provided. In case a functor is not provided, it is set to
|
||||
/// `CGAL::Null_functor`.
|
||||
|
|
@ -69,46 +69,46 @@ typedef unspecified_type Comparison_result;
|
|||
|
||||
/*!
|
||||
|
||||
A model of `RealEmbeddableTraits_::IsZero`
|
||||
In case `Type` is also model of `IntegralDomainWithoutDivision`
|
||||
this is a model of `AlgebraicStructureTraits_::IsZero`.
|
||||
*/
|
||||
typedef unspecified_type Is_zero;
|
||||
A model of `RealEmbeddableTraits_::IsZero`
|
||||
In case `Type` is also model of `IntegralDomainWithoutDivision`
|
||||
this is a model of `AlgebraicStructureTraits_::IsZero`.
|
||||
*/
|
||||
typedef unspecified_type Is_zero;
|
||||
|
||||
/*!
|
||||
A model of `RealEmbeddableTraits_::Abs`
|
||||
*/
|
||||
typedef unspecified_type Abs;
|
||||
A model of `RealEmbeddableTraits_::Abs`
|
||||
*/
|
||||
typedef unspecified_type Abs;
|
||||
|
||||
/*!
|
||||
A model of `RealEmbeddableTraits_::Sgn`
|
||||
*/
|
||||
typedef unspecified_type Sgn;
|
||||
A model of `RealEmbeddableTraits_::Sgn`
|
||||
*/
|
||||
typedef unspecified_type Sgn;
|
||||
|
||||
/*!
|
||||
A model of `RealEmbeddableTraits_::IsPositive`
|
||||
*/
|
||||
typedef unspecified_type Is_positive;
|
||||
A model of `RealEmbeddableTraits_::IsPositive`
|
||||
*/
|
||||
typedef unspecified_type Is_positive;
|
||||
|
||||
/*!
|
||||
A model of `RealEmbeddableTraits_::IsNegative`
|
||||
*/
|
||||
typedef unspecified_type Is_negative;
|
||||
A model of `RealEmbeddableTraits_::IsNegative`
|
||||
*/
|
||||
typedef unspecified_type Is_negative;
|
||||
|
||||
/*!
|
||||
A model of `RealEmbeddableTraits_::Compare`
|
||||
*/
|
||||
typedef unspecified_type Compare;
|
||||
A model of `RealEmbeddableTraits_::Compare`
|
||||
*/
|
||||
typedef unspecified_type Compare;
|
||||
|
||||
/*!
|
||||
A model of `RealEmbeddableTraits_::ToDouble`
|
||||
*/
|
||||
typedef unspecified_type To_double;
|
||||
A model of `RealEmbeddableTraits_::ToDouble`
|
||||
*/
|
||||
typedef unspecified_type To_double;
|
||||
|
||||
/*!
|
||||
A model of `RealEmbeddableTraits_::ToInterval`
|
||||
*/
|
||||
typedef unspecified_type To_interval;
|
||||
A model of `RealEmbeddableTraits_::ToInterval`
|
||||
*/
|
||||
typedef unspecified_type To_interval;
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,18 +4,18 @@
|
|||
#include <CGAL/int.h>
|
||||
|
||||
template< typename NT > NT unit_part(const NT& x);
|
||||
template< typename NT >
|
||||
template< typename NT >
|
||||
NT unit_part_(const NT& x, CGAL::Field_tag);
|
||||
template< typename NT >
|
||||
template< typename NT >
|
||||
NT unit_part_(const NT& x, CGAL::Integral_domain_without_division_tag);
|
||||
|
||||
template< typename NT >
|
||||
NT unit_part(const NT& x){
|
||||
// the unit part of 0 is defined as 1.
|
||||
// the unit part of 0 is defined as 1.
|
||||
if (x == 0 ) return NT(1);
|
||||
|
||||
typedef CGAL::Algebraic_structure_traits<NT> AST;
|
||||
typedef typename AST::Algebraic_category Algebraic_category;
|
||||
typedef typename AST::Algebraic_category Algebraic_category;
|
||||
return unit_part_(x,Algebraic_category());
|
||||
}
|
||||
|
||||
|
|
@ -28,21 +28,21 @@ NT unit_part_(const NT& x, CGAL::Integral_domain_without_division_tag){
|
|||
template< typename NT >
|
||||
NT unit_part_(const NT& x, CGAL::Field_tag){
|
||||
// For Fields every x != 0 is a unit.
|
||||
// Therefore, every x != 0 is its own unit part.
|
||||
// Therefore, every x != 0 is its own unit part.
|
||||
return x;
|
||||
}
|
||||
|
||||
int main(){
|
||||
// Function call for a model of EuclideanRing, i.e. int.
|
||||
// Function call for a model of EuclideanRing, i.e. int.
|
||||
std::cout<< "int: unit_part(-3 ): " << unit_part(-3 ) << std::endl;
|
||||
// Function call for a model of FieldWithSqrt, i.e. double
|
||||
// Function call for a model of FieldWithSqrt, i.e. double
|
||||
std::cout<< "double: unit_part(-3.0): " << unit_part(-3.0) << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Note that this is just an example
|
||||
// This implementation for unit part won't work for some types, e.g.,
|
||||
// types that are not RealEmbeddable or types representing structures that have
|
||||
// Note that this is just an example
|
||||
// This implementation for unit part won't work for some types, e.g.,
|
||||
// types that are not RealEmbeddable or types representing structures that have
|
||||
// more units than just -1 and +1. (e.g. MP_Float representing Z[1/2])
|
||||
// From there Algebraic_structure_traits provides the functor Unit_part.
|
||||
// From there Algebraic_structure_traits provides the functor Unit_part.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
namespace CGAL {
|
||||
/*!
|
||||
|
||||
\mainpage User Manual
|
||||
\mainpage User Manual
|
||||
\anchor Chapter_Algebraic_Kernel
|
||||
\anchor chapteralgebraickerneld
|
||||
\cgalAutoToc
|
||||
|
|
@ -9,13 +9,13 @@ namespace CGAL {
|
|||
|
||||
\section Algebraic_kernel_dIntroduction Introduction
|
||||
|
||||
Real solving of polynomials is a fundamental problem with a wide application range.
|
||||
This package is targeted at providing black-box implementations of state-of-the-art
|
||||
Real solving of polynomials is a fundamental problem with a wide application range.
|
||||
This package is targeted at providing black-box implementations of state-of-the-art
|
||||
algorithms to determine, compare, and approximate real roots of univariate polynomials
|
||||
and bivariate polynomial systems. Such a black-box is called an *Algebraic Kernel*.
|
||||
Since this package is aimed at providing more than one implementation, the interface of
|
||||
the algebraic kernels is expressed in concepts. The main concepts provided by this package are the
|
||||
`AlgebraicKernel_d_1` for univariate polynomial systems and `AlgebraicKernel_d_2`
|
||||
and bivariate polynomial systems. Such a black-box is called an *Algebraic Kernel*.
|
||||
Since this package is aimed at providing more than one implementation, the interface of
|
||||
the algebraic kernels is expressed in concepts. The main concepts provided by this package are the
|
||||
`AlgebraicKernel_d_1` for univariate polynomial systems and `AlgebraicKernel_d_2`
|
||||
for bivariate polynomial systems, the latter being a refinement of the first.
|
||||
|
||||
\section Algebraic_kernel_dAlgebraic Algebraic Kernel Concepts
|
||||
|
|
@ -24,18 +24,18 @@ for bivariate polynomial systems, the latter being a refinement of the first.
|
|||
|
||||
\subsection Algebraic_kernel_dMajorTypes Major Types
|
||||
|
||||
First of all, the univariate algebraic kernel provides construction, comparison and
|
||||
approximation of real roots of univariate polynomials.
|
||||
Thus, the major public types the `AlgebraicKernel_d_1` provides are:
|
||||
First of all, the univariate algebraic kernel provides construction, comparison and
|
||||
approximation of real roots of univariate polynomials.
|
||||
Thus, the major public types the `AlgebraicKernel_d_1` provides are:
|
||||
|
||||
`AlgebraicKernel_d_1::Polynomial_1` - the type representing univariate polynomials,
|
||||
|
||||
`AlgebraicKernel_d_1::Coefficient` - the coefficient type of these polynomials,
|
||||
`AlgebraicKernel_d_1::Coefficient` - the coefficient type of these polynomials,
|
||||
|
||||
`AlgebraicKernel_d_1::Algebraic_real_1` - the type representing real roots,
|
||||
|
||||
`AlgebraicKernel_d_1::Bound` - the type which is used to approximate these algebraic reals,
|
||||
in particular, it is used to represent the boundaries of isolating intervals.
|
||||
`AlgebraicKernel_d_1::Bound` - the type which is used to approximate these algebraic reals,
|
||||
in particular, it is used to represent the boundaries of isolating intervals.
|
||||
|
||||
\subsection Algebraic_kernel_dConstructionofAlgebraic Construction of Algebraic Real Numbers
|
||||
|
||||
|
|
@ -64,22 +64,22 @@ comparison with int, the coefficient type and the bound type.
|
|||
|
||||
There are several ways to approximate an `AlgebraicKernel_d_1::Algebraic_real_1`:
|
||||
|
||||
`AlgebraicKernel_d_1::Approximate_absolute_1` - provides an approximation that is
|
||||
`AlgebraicKernel_d_1::Approximate_absolute_1` - provides an approximation that is
|
||||
better than the passed absolute error bound,
|
||||
|
||||
`AlgebraicKernel_d_1::Approximate_relative_1` - provides an approximation that is
|
||||
`AlgebraicKernel_d_1::Approximate_relative_1` - provides an approximation that is
|
||||
better than the passed relative error bound,
|
||||
|
||||
`AlgebraicKernel_d_1::Isolate_1` - returns an isolating interval with respect to
|
||||
`AlgebraicKernel_d_1::Isolate_1` - returns an isolating interval with respect to
|
||||
a given univariate polynomial,
|
||||
|
||||
A related function object is `AlgebraicKernel_d_1::Bound_between_1`, which computes
|
||||
A related function object is `AlgebraicKernel_d_1::Bound_between_1`, which computes
|
||||
a number that isolates two algebraic real numbers.
|
||||
|
||||
\subsection Algebraic_kernel_dInterplaywithPolynomials Interplay with Polynomials
|
||||
|
||||
It is also possible to retrieve a representing polynomial from an
|
||||
algebraic real using `AlgebraicKernel_d_1::Compute_polynomial_1`,
|
||||
algebraic real using `AlgebraicKernel_d_1::Compute_polynomial_1`,
|
||||
which guarantees that the algebraic real is a root of the returned
|
||||
polynomial. As the name already indicates, this operation may be very
|
||||
costly since the polynomial may not be computed yet. Moreover, it is
|
||||
|
|
@ -116,17 +116,17 @@ provides several function objects to handle polynomials:
|
|||
|
||||
`AlgebraicKernel_d_1::Make_coprime_1` - decomposes two polynomials into the coprime factors and their common factor.
|
||||
|
||||
Though the polynomial package provides similar functionality we suggest to use
|
||||
the function objects provided by the kernel, since the design of the algebraic kernel
|
||||
Though the polynomial package provides similar functionality we suggest to use
|
||||
the function objects provided by the kernel, since the design of the algebraic kernel
|
||||
allows for instance internal caching by the kernel.
|
||||
|
||||
Also note that `AlgebraicKernel_d_1::Square_free_factorize_1` only computes the square free
|
||||
factorization up to a constant factor. This is a slight modification with respect to its
|
||||
counterpart in `Polynomial_traits_d`. In this way it was possible that the concepts just require
|
||||
the coefficient type to be a model of `IntegralDomain`, instead of `Field` or `UniqueFactorizationDomain`.
|
||||
Also note that `AlgebraicKernel_d_1::Square_free_factorize_1` only computes the square free
|
||||
factorization up to a constant factor. This is a slight modification with respect to its
|
||||
counterpart in `Polynomial_traits_d`. In this way it was possible that the concepts just require
|
||||
the coefficient type to be a model of `IntegralDomain`, instead of `Field` or `UniqueFactorizationDomain`.
|
||||
For more details see also:
|
||||
|
||||
- \ref PolynomialTraits_d::SquareFreeFactorize
|
||||
- \ref PolynomialTraits_d::SquareFreeFactorize
|
||||
- \ref PolynomialTraits_d::SquareFreeFactorizeUpToConstantFactor
|
||||
|
||||
\subsection Algebraic_kernel_dDesignRationale Design Rationale
|
||||
|
|
@ -142,7 +142,7 @@ one can also imagine the representation by a polynomial and the index
|
|||
of the root, e.g., as the \f$ i\f$th real root when enumerated from minus
|
||||
to plus infinity. Moreover, it may very well be that the kernel just
|
||||
computes an approximation of the number, whereas the representing
|
||||
polynomial is not computed yet.
|
||||
polynomial is not computed yet.
|
||||
This is in particular relevant in relation to the `AlgebraicKernel_d_2`,
|
||||
where `AlgebraicKernel_d_1::Algebraic_real_1` is used to represent coordinates of solutions of bivariate systems.
|
||||
Hence, the design does
|
||||
|
|
@ -156,10 +156,10 @@ an `AlgebraicKernel_d_1::Algebraic_real_1`.
|
|||
|
||||
\subsection Algebraic_kernel_dBivariateAlgebraicKernel Bivariate Algebraic Kernel
|
||||
|
||||
The concept `AlgebraicKernel_d_2` is a refinement of `AlgebraicKernel_d_1`,
|
||||
that is, a model of `AlgebraicKernel_d_2` is also a model of `AlgebraicKernel_d_1`.
|
||||
Hence, the `AlgebraicKernel_d_2` concept is designed such that occurring
|
||||
names and functionalities are as similar as possible to those in the
|
||||
The concept `AlgebraicKernel_d_2` is a refinement of `AlgebraicKernel_d_1`,
|
||||
that is, a model of `AlgebraicKernel_d_2` is also a model of `AlgebraicKernel_d_1`.
|
||||
Hence, the `AlgebraicKernel_d_2` concept is designed such that occurring
|
||||
names and functionalities are as similar as possible to those in the
|
||||
`AlgebraicKernel_d_1` concept.
|
||||
The following are a direct generalization of their univariate counterparts:
|
||||
|
||||
|
|
@ -192,22 +192,22 @@ The following are a direct generalization of their univariate counterparts:
|
|||
`AlgebraicKernel_d_2::Is_zero_at_2`.
|
||||
|
||||
For instance, `AlgebraicKernel_d_2::Solve_2`
|
||||
provides the solution for a bivariate polynomial system.
|
||||
However, it is also possible to obtain the coordinates of these
|
||||
provides the solution for a bivariate polynomial system.
|
||||
However, it is also possible to obtain the coordinates of these
|
||||
solutions with the additional functors:
|
||||
|
||||
`AlgebraicKernel_d_2::Compute_x_2`,
|
||||
|
||||
`AlgebraicKernel_d_2::Compute_y_2`.
|
||||
|
||||
In principal this would be sufficient generalization,
|
||||
since functions such as isolating, approximating algebraic real numbers
|
||||
could be implemented using these access functions ant
|
||||
the corresponding functionalities in the univariate algebraic kernel.
|
||||
In principal this would be sufficient generalization,
|
||||
since functions such as isolating, approximating algebraic real numbers
|
||||
could be implemented using these access functions ant
|
||||
the corresponding functionalities in the univariate algebraic kernel.
|
||||
However, one should be aware that an `AlgebraicKernel_d_2::Algebraic_real_2`
|
||||
is not necessarily represented as a pair of univariate solutions, that is,
|
||||
using `AlgebraicKernel_d_2::Compute_y_2` may entail considerable
|
||||
computations. Therefore, the concept also requires the following
|
||||
is not necessarily represented as a pair of univariate solutions, that is,
|
||||
using `AlgebraicKernel_d_2::Compute_y_2` may entail considerable
|
||||
computations. Therefore, the concept also requires the following
|
||||
additional functors that may allow a model to bypass this issue:
|
||||
|
||||
`AlgebraicKernel_d_2::Compute_polynomial_x_2`,
|
||||
|
|
@ -238,33 +238,33 @@ additional functors that may allow a model to bypass this issue:
|
|||
|
||||
\subsection Algebraic_kernel_dGenericAlgebraicKernels Generic Algebraic Kernels
|
||||
|
||||
The package provides generic models of the univariate and bivariate algebraic
|
||||
The package provides generic models of the univariate and bivariate algebraic
|
||||
kernel, namely `Algebraic_kernel_d_1<Coeff>` and `Algebraic_kernel_d_2<Coeff>`,
|
||||
respectively. Both kernels support a large set of number types as their
|
||||
template argument, which defines the supported coefficient type. The supported
|
||||
respectively. Both kernels support a large set of number types as their
|
||||
template argument, which defines the supported coefficient type. The supported
|
||||
types are, for instance, `Gmpz` and `Gmpq` as well as the corresponding types
|
||||
of LEDA and CORE.
|
||||
|
||||
The `Algebraic_kernel_d_1<Coeff>` represents an algebraic real root by a square
|
||||
free polynomial and an isolating interval that uniquely defines the root.
|
||||
The `Algebraic_kernel_d_1<Coeff>` represents an algebraic real root by a square
|
||||
free polynomial and an isolating interval that uniquely defines the root.
|
||||
The current method to isolate roots is the Bitstream Descartes
|
||||
method \cgalCite{eigenwillig-phd-08}.
|
||||
The used method to refine the approximation of an algebraic real root is a
|
||||
slightly modified (filtered) version of the one presented in \cgalCite{abbott-qir-06}.
|
||||
method \cgalCite{eigenwillig-phd-08}.
|
||||
The used method to refine the approximation of an algebraic real root is a
|
||||
slightly modified (filtered) version of the one presented in \cgalCite{abbott-qir-06}.
|
||||
The method has quadratic convergence.
|
||||
|
||||
`Algebraic_kernel_d_2<Coeff>` is based on an algorithm computing a
|
||||
`Algebraic_kernel_d_2<Coeff>` is based on an algorithm computing a
|
||||
geometric-topological analysis of a single curve \cgalCite{ekw-fast-07} and of a
|
||||
pair of curves \cgalCite{ek-exact-08}.
|
||||
The main idea behind both analyses is to compute the critical
|
||||
x-coordinates of curves and curve pairs by projection (resultants), and compute
|
||||
additional information about the critical fibers using subresultants
|
||||
and Sturm-Habicht sequences \cgalCite{grlr-sturm-habicht-98}.
|
||||
With that information, the fiber at
|
||||
and Sturm-Habicht sequences \cgalCite{grlr-sturm-habicht-98}.
|
||||
With that information, the fiber at
|
||||
critical x-coordinates is computed by a variant of the Bitstream
|
||||
Descartes method.
|
||||
See also \cgalCite{kerber-phd-09} for a comprehensive description of
|
||||
these techniques.
|
||||
these techniques.
|
||||
Almost all functors in the class that take a `Polynomial_2`
|
||||
object as argument trigger such an analysis as a main computation
|
||||
step. For efficiency, these analyses (of single curves and curve
|
||||
|
|
@ -278,17 +278,17 @@ by its \f$ x\f$-coordinate \f$ x_0\f$ (as described in the `Algebraic_kernel_d_1
|
|||
paragraph above), an algebraic curve where \f$ p\f$ lies on, and an
|
||||
integer \f$ i\f$, denoting that \f$ p\f$ is the \f$ i\f$th point in the fiber at \f$ x_0\f$,
|
||||
counted from the bottom (ignoring a possible vertical line at \f$ x_0\f$).
|
||||
Note that this determines the point uniquely, but the \f$ y\f$-coordinate
|
||||
Note that this determines the point uniquely, but the \f$ y\f$-coordinate
|
||||
is not stored internally in terms of an `Algebraic_real_1` object.
|
||||
Querying such a representation by calling `Compute_y_2` is a
|
||||
time-consuming step, and should be avoided for efficiency reasons if possible.
|
||||
|
||||
\subsection Algebraic_kernel_dAlgebraicKernelsBasedon Algebraic Kernels Based on RS
|
||||
|
||||
The package offers two univariate algebraic kernels that are based on
|
||||
The package offers two univariate algebraic kernels that are based on
|
||||
the library RS \cgalCite{cgal:r-rs}, namely `Algebraic_kernel_rs_gmpz_d_1`
|
||||
and `Algebraic_kernel_rs_gmpq_d_1`. As the names indicate,
|
||||
the kernels are based on the library RS \cgalCite{cgal:r-rs} and support univariate
|
||||
and `Algebraic_kernel_rs_gmpq_d_1`. As the names indicate,
|
||||
the kernels are based on the library RS \cgalCite{cgal:r-rs} and support univariate
|
||||
polynomials over `Gmpz` or `Gmpq`, respectively.
|
||||
|
||||
In general we encourage to use `Algebraic_kernel_rs_gmpz_d_1`
|
||||
|
|
@ -301,9 +301,9 @@ overhead caused by the necessary conversions. However, since this may
|
|||
not always be a major issue, the `Algebraic_kernel_rs_gmpq_d_1`
|
||||
is provided for convenience.
|
||||
|
||||
The core of both kernels is the implementation of the interval Descartes
|
||||
algorithm \cgalCite{cgal:rz-jcam-04} of the library RS \cgalCite{cgal:r-rs},
|
||||
which is used to isolate the roots of the polynomial.
|
||||
The core of both kernels is the implementation of the interval Descartes
|
||||
algorithm \cgalCite{cgal:rz-jcam-04} of the library RS \cgalCite{cgal:r-rs},
|
||||
which is used to isolate the roots of the polynomial.
|
||||
The RS library restricts its attention to univariate integer
|
||||
polynomials and some substantial gain of efficiency can be made by using a kernel
|
||||
that does not follow the generic programming paradigm, by avoiding
|
||||
|
|
@ -314,7 +314,7 @@ make heavy use of the <span class="textsc">Mpfr</span> \cgalCite{cgal:mt-mpfr} a
|
|||
libraries, and of their \cgal interfaces, `Gmpfr` and `Gmpfi`.
|
||||
The algebraic numbers (roots of the polynomials) are represented
|
||||
in the two RS kernels by a `Gmpfi` interval and a pointer to
|
||||
the polynomial of which they are roots. See \cgalCite{cgal:lpt-wea-09}
|
||||
the polynomial of which they are roots. See \cgalCite{cgal:lpt-wea-09}
|
||||
for more details on the implementation, tests of these kernels,
|
||||
comparisons with other algebraic kernels and discussions about the
|
||||
efficiency.
|
||||
|
|
@ -323,26 +323,26 @@ efficiency.
|
|||
|
||||
\subsection CGALAK1ConstructionExamples Construction of Algebraic Real Numbers
|
||||
|
||||
The following example illustrates the construction of `AlgebraicKernel_d_1::Algebraic_real_1`
|
||||
The following example illustrates the construction of `AlgebraicKernel_d_1::Algebraic_real_1`
|
||||
using `AlgebraicKernel_d_1::Construct_algebraic_real_1`:
|
||||
\cgalExample{Algebraic_kernel_d/Construct_algebraic_real_1.cpp}
|
||||
|
||||
\subsection CGALAK1Solving Solving Univariate Polynomials
|
||||
|
||||
The following example illustrates the construction of `AlgebraicKernel_d_1::Algebraic_real_1`
|
||||
using `AlgebraicKernel_d_1::Solve_1`: \cgalExample{Algebraic_kernel_d/Solve_1.cpp}
|
||||
The following example illustrates the construction of `AlgebraicKernel_d_1::Algebraic_real_1`
|
||||
using `AlgebraicKernel_d_1::Solve_1`: \cgalExample{Algebraic_kernel_d/Solve_1.cpp}
|
||||
|
||||
\subsection CGALAK1EGCompare_1 Comparison and Approximation of Algebraic Real Numbers
|
||||
|
||||
The following example illustrates the comparison of `AlgebraicKernel_d_1::Algebraic_real_1` numbers:
|
||||
The following example illustrates the comparison of `AlgebraicKernel_d_1::Algebraic_real_1` numbers:
|
||||
\cgalExample{Algebraic_kernel_d/Compare_1.cpp}
|
||||
|
||||
\subsection CGALAK1EGIsolate_1 Isolation of Algebraic Real Numbers with respect to roots of other polynomials
|
||||
\subsection CGALAK1EGIsolate_1 Isolation of Algebraic Real Numbers with respect to roots of other polynomials
|
||||
|
||||
The following example illustrates the isolation of `AlgebraicKernel_d_1::Algebraic_real_1` numbers:
|
||||
The following example illustrates the isolation of `AlgebraicKernel_d_1::Algebraic_real_1` numbers:
|
||||
\cgalExample{Algebraic_kernel_d/Isolate_1.cpp}
|
||||
|
||||
\subsection CGALAK1EGSign_at_1 Interplay with Polynomials
|
||||
\subsection CGALAK1EGSign_at_1 Interplay with Polynomials
|
||||
|
||||
The following example illustrates the sign evaluation of `AlgebraicKernel_d_1::Algebraic_real_1` numbers in polynomials:
|
||||
\cgalExample{Algebraic_kernel_d/Sign_at_1.cpp}
|
||||
|
|
@ -353,9 +353,9 @@ This package is clearly split into a univariate and bivariate
|
|||
kernel. However, with respect to its history the package splits into
|
||||
a design part and an implementation part.
|
||||
|
||||
The concepts, which make up the design part,
|
||||
The concepts, which make up the design part,
|
||||
were written by Eric Berberich, Michael Hemmer, and
|
||||
Monique Teillaud.
|
||||
Monique Teillaud.
|
||||
The design history of the package is fairly old and several
|
||||
ideas that influenced this package can already be found
|
||||
in \cgalCite{cgal:bhkt-risak-07}. Since then, the initial design underwent
|
||||
|
|
@ -368,20 +368,20 @@ ideas that was brought to them throughout the last years. In particular,
|
|||
they want to thank Menelaos Karavelas and Elias Tsigaridas for their
|
||||
initial contributions.
|
||||
|
||||
The two generic models where initially developed as part of the <span class="textsc">Exacus</span> \cgalCite{beh-eeeafcs-05} project.
|
||||
However, the models are now fully integrated into the \cgal library,
|
||||
The two generic models where initially developed as part of the <span class="textsc">Exacus</span> \cgalCite{beh-eeeafcs-05} project.
|
||||
However, the models are now fully integrated into the \cgal library,
|
||||
since also the relevant layers of <span class="textsc">Exacus</span> are now part of \cgal.
|
||||
The main authors for `Algebraic_kernel_d_1<Coeff>` and `Algebraic_kernel_d_2<Coeff>` are
|
||||
Michael Hemmer and Michael Kerber, respectively. Notwithstanding, the authors also want to emphasize the
|
||||
contribution of all authors of the <span class="textsc">Exacus</span> project,
|
||||
The main authors for `Algebraic_kernel_d_1<Coeff>` and `Algebraic_kernel_d_2<Coeff>` are
|
||||
Michael Hemmer and Michael Kerber, respectively. Notwithstanding, the authors also want to emphasize the
|
||||
contribution of all authors of the <span class="textsc">Exacus</span> project,
|
||||
particularly the contribution of Arno Eigenwillig, Sebastian Limbach and Pavel Emeliyanenko.
|
||||
|
||||
The two univariate kernels that interface the library RS \cgalCite{cgal:r-rs} were
|
||||
written by Luis Peñaranda and Sylvain Lazard.
|
||||
Both models interface the library RS \cgalCite{cgal:r-rs} by Fabrice Rouillier.
|
||||
The authors want to thank Fabrice Rouillier and Elias Tsigaridas for
|
||||
The two univariate kernels that interface the library RS \cgalCite{cgal:r-rs} were
|
||||
written by Luis Peñaranda and Sylvain Lazard.
|
||||
Both models interface the library RS \cgalCite{cgal:r-rs} by Fabrice Rouillier.
|
||||
The authors want to thank Fabrice Rouillier and Elias Tsigaridas for
|
||||
strong support and many useful discussions that lead to the integration of RS.
|
||||
|
||||
*/
|
||||
*/
|
||||
} /* namespace CGAL */
|
||||
|
||||
|
|
|
|||
|
|
@ -4,23 +4,23 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicKernelDModels
|
||||
|
||||
The class represents an algebraic real root by a square free polynomial and an
|
||||
isolating interval that uniquely defines the root.
|
||||
The template argument `Coeff` determines the coefficient type of the
|
||||
kernel, which is also the coefficient type of the supported polynomials.
|
||||
The class represents an algebraic real root by a square free polynomial and an
|
||||
isolating interval that uniquely defines the root.
|
||||
The template argument `Coeff` determines the coefficient type of the
|
||||
kernel, which is also the coefficient type of the supported polynomials.
|
||||
|
||||
Currently, the following coefficient types are supported:
|
||||
Currently, the following coefficient types are supported:
|
||||
|
||||
- `Gmpz`, `Gmpq`, (requires configuration with external libraries GMP, MPFR and MPFI)
|
||||
- `Gmpz`, `Gmpq`, (requires configuration with external libraries GMP, MPFR and MPFI)
|
||||
|
||||
- `CORE::BigInt`, `CORE::BigRat`, (requires configuration with external library GMP)
|
||||
- `CORE::BigInt`, `CORE::BigRat`, (requires configuration with external library GMP)
|
||||
|
||||
- `leda_integer`, `leda_rational`. (requires configuration with external library LEDA)
|
||||
- `leda_integer`, `leda_rational`. (requires configuration with external library LEDA)
|
||||
|
||||
\cgalAdvancedBegin
|
||||
The template argument type can also be set to `Sqrt_extension<NT,ROOT>`, where `NT` is
|
||||
one of the types listed above. `ROOT` should be one of the integer types.
|
||||
See also the documentation of `Sqrt_extension<NT,ROOT>`.
|
||||
The template argument type can also be set to `Sqrt_extension<NT,ROOT>`, where `NT` is
|
||||
one of the types listed above. `ROOT` should be one of the integer types.
|
||||
See also the documentation of `Sqrt_extension<NT,ROOT>`.
|
||||
\cgalAdvancedEnd
|
||||
|
||||
The current method to isolate roots is the bitstream Descartes method
|
||||
|
|
@ -31,8 +31,8 @@ method has quadratic convergence.
|
|||
|
||||
\cgalModels `AlgebraicKernel_d_1`
|
||||
|
||||
\sa `AlgebraicKernel_d_1`
|
||||
\sa `Polynomial_d`
|
||||
\sa `AlgebraicKernel_d_1`
|
||||
\sa `Polynomial_d`
|
||||
\sa `CGAL::Algebraic_kernel_d_2<Coeff>`
|
||||
|
||||
*/
|
||||
|
|
@ -40,40 +40,40 @@ template< typename Coeff >
|
|||
class Algebraic_kernel_d_1 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Same type as the template argument `Coeff`.
|
||||
*/
|
||||
typedef unspecified_type Coefficient;
|
||||
Same type as the template argument `Coeff`.
|
||||
*/
|
||||
typedef unspecified_type Coefficient;
|
||||
|
||||
/*!
|
||||
A model of `::AlgebraicKernel_d_1::Polynomial_1`.
|
||||
*/
|
||||
typedef unspecified_type Polynomial_1;
|
||||
*/
|
||||
typedef unspecified_type Polynomial_1;
|
||||
|
||||
/*!
|
||||
A model of `::AlgebraicKernel_d_1::Algebraic_real_1`.
|
||||
*/
|
||||
typedef unspecified_type Algebraic_real_1;
|
||||
*/
|
||||
typedef unspecified_type Algebraic_real_1;
|
||||
|
||||
/*!
|
||||
The choice of `Coeff` also determines the provided bound type.
|
||||
In case of `Coeff` is:
|
||||
In case of `Coeff` is:
|
||||
|
||||
- `Gmpz` or `Gmpq`, this is `Gmpq`,
|
||||
|
||||
- `CORE::BigInt` or `CORE::BigRat`, this is `CORE::BigRat`,
|
||||
|
||||
- `leda_integer` or `leda_rational`, this is `leda_rational`.
|
||||
*/
|
||||
typedef unspecified_type Bound;
|
||||
*/
|
||||
typedef unspecified_type Bound;
|
||||
|
||||
/*!
|
||||
The multiplicity type is `int`.
|
||||
*/
|
||||
typedef unspecified_type Multiplicity_type;
|
||||
The multiplicity type is `int`.
|
||||
*/
|
||||
typedef unspecified_type Multiplicity_type;
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,41 +4,41 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicKernelDModels
|
||||
|
||||
This class gathers necessary tools for solving and handling bivariate
|
||||
This class gathers necessary tools for solving and handling bivariate
|
||||
polynomial systems of general degree \f$ d\f$.
|
||||
|
||||
This class is based on an algorithm computing a
|
||||
geometric-topological analysis of a single curve \cite ekw-fast-07 and of a
|
||||
pair of curves \cite ek-exact-08.
|
||||
The main idea behind both analyses is to compute the critical
|
||||
x-coordinates of curves and curve pairs by projection (resultants), and compute
|
||||
additional information about the critical fibers using subresultants
|
||||
and Sturm-Habicht sequences \cite grlr-sturm-habicht-98.
|
||||
With that information, the fiber at
|
||||
critical x-coordinates is computed by a variant of the Bitstream
|
||||
Descartes method.
|
||||
See also \cite kerber-phd-09 for a comprehensive description of
|
||||
these techniques.
|
||||
This class is based on an algorithm computing a
|
||||
geometric-topological analysis of a single curve \cite ekw-fast-07 and of a
|
||||
pair of curves \cite ek-exact-08.
|
||||
The main idea behind both analyses is to compute the critical
|
||||
x-coordinates of curves and curve pairs by projection (resultants), and compute
|
||||
additional information about the critical fibers using subresultants
|
||||
and Sturm-Habicht sequences \cite grlr-sturm-habicht-98.
|
||||
With that information, the fiber at
|
||||
critical x-coordinates is computed by a variant of the Bitstream
|
||||
Descartes method.
|
||||
See also \cite kerber-phd-09 for a comprehensive description of
|
||||
these techniques.
|
||||
|
||||
A point \f$ p\f$ of type `Algebraic_real_2` is represented
|
||||
by its \f$ x\f$-coordinate \f$ x_0\f$ (as described in the `Algebraic_kernel_d_1`
|
||||
paragraph above), an algebraic curve where \f$ p\f$ lies on, and an
|
||||
integer \f$ i\f$, denoting that \f$ p\f$ is the \f$ i\f$th point in the fiber at \f$ x_0\f$,
|
||||
counted from the bottom (ignoring a possible vertical line at \f$ x_0\f$).
|
||||
This determines the point uniquely, but the \f$ y\f$-coordinate
|
||||
is not stored internally in terms of an `Algebraic_real_1` object.
|
||||
Querying such a representation by calling `Compute_y_2` is a
|
||||
time-consuming step, and should be avoided for efficiency reasons if possible.
|
||||
Note that this representation is not exposed in the interface.
|
||||
A point \f$ p\f$ of type `Algebraic_real_2` is represented
|
||||
by its \f$ x\f$-coordinate \f$ x_0\f$ (as described in the `Algebraic_kernel_d_1`
|
||||
paragraph above), an algebraic curve where \f$ p\f$ lies on, and an
|
||||
integer \f$ i\f$, denoting that \f$ p\f$ is the \f$ i\f$th point in the fiber at \f$ x_0\f$,
|
||||
counted from the bottom (ignoring a possible vertical line at \f$ x_0\f$).
|
||||
This determines the point uniquely, but the \f$ y\f$-coordinate
|
||||
is not stored internally in terms of an `Algebraic_real_1` object.
|
||||
Querying such a representation by calling `Compute_y_2` is a
|
||||
time-consuming step, and should be avoided for efficiency reasons if possible.
|
||||
Note that this representation is not exposed in the interface.
|
||||
|
||||
The template argument `Coeff` determines the coefficient type of the
|
||||
kernel, which is also the innermost coefficient type of the supported polynomials.
|
||||
The template argument `Coeff` determines the coefficient type of the
|
||||
kernel, which is also the innermost coefficient type of the supported polynomials.
|
||||
|
||||
Currently, the following coefficient types are supported:
|
||||
Currently, the following coefficient types are supported:
|
||||
|
||||
- `Gmpz`, `Gmpq`, (requires configuration with external libraries GMP, MPFR and MPFI)
|
||||
- `CORE::BigInt`, `CORE::BigRat`, (requires configuration with external library GMP)
|
||||
- `leda_integer`, `leda_rational`. (requires configuration with external library LEDA)
|
||||
- `Gmpz`, `Gmpq`, (requires configuration with external libraries GMP, MPFR and MPFI)
|
||||
- `CORE::BigInt`, `CORE::BigRat`, (requires configuration with external library GMP)
|
||||
- `leda_integer`, `leda_rational`. (requires configuration with external library LEDA)
|
||||
|
||||
\cgalAdvancedBegin
|
||||
The template argument type can also be set to
|
||||
|
|
@ -49,9 +49,9 @@ documentation of `Sqrt_extension<NT,ROOT>`.
|
|||
|
||||
\cgalModels `AlgebraicKernel_d_2`
|
||||
|
||||
\sa `AlgebraicKernel_d_1`
|
||||
\sa `AlgebraicKernel_d_2`
|
||||
\sa `Polynomial_d`
|
||||
\sa `AlgebraicKernel_d_1`
|
||||
\sa `AlgebraicKernel_d_2`
|
||||
\sa `Polynomial_d`
|
||||
\sa `CGAL::Algebraic_kernel_d_2<Coeff>`
|
||||
|
||||
*/
|
||||
|
|
@ -59,40 +59,40 @@ template< typename Coeff >
|
|||
class Algebraic_kernel_d_2 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Same type as the template argument `Coeff`.
|
||||
*/
|
||||
typedef unspecified_type Coefficient;
|
||||
/*!
|
||||
Same type as the template argument `Coeff`.
|
||||
*/
|
||||
typedef unspecified_type Coefficient;
|
||||
|
||||
/*!
|
||||
A model of `AlgebraicKernel_d_2::Polynomial_2`
|
||||
*/
|
||||
typedef unspecified_type Polynomial_2;
|
||||
/*!
|
||||
A model of `AlgebraicKernel_d_2::Polynomial_2`
|
||||
*/
|
||||
typedef unspecified_type Polynomial_2;
|
||||
|
||||
/*!
|
||||
A model of `AlgebraicKernel_d_2::AlgebraicReal_2`
|
||||
*/
|
||||
typedef unspecified_type Algebraic_real_2;
|
||||
/*!
|
||||
A model of `AlgebraicKernel_d_2::AlgebraicReal_2`
|
||||
*/
|
||||
typedef unspecified_type Algebraic_real_2;
|
||||
|
||||
/*!
|
||||
/*!
|
||||
The choice of `Coeff` also determines the provided bound type.
|
||||
In case of `Coeff` is
|
||||
In case of `Coeff` is
|
||||
- `Gmpz` or `Gmpq`, this is `Gmpq`
|
||||
|
||||
- `CORE::BigInt` or `CORE::BigRat`, this is `CORE::BigRat`
|
||||
|
||||
- `leda_integer` or `leda_rational`, this is `leda_rational`
|
||||
|
||||
*/
|
||||
typedef unspecified_type Bound;
|
||||
*/
|
||||
typedef unspecified_type Bound;
|
||||
|
||||
/*!
|
||||
The multiplicity type is `int`.
|
||||
*/
|
||||
typedef unspecified_type Multiplicity_type;
|
||||
/*!
|
||||
The multiplicity type is `int`.
|
||||
*/
|
||||
typedef unspecified_type Multiplicity_type;
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,54 +4,54 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicKernelDModels
|
||||
|
||||
\anchor Algebraic_kernel_rs_gmpq_d_1
|
||||
\anchor Algebraic_kernel_rs_gmpq_d_1
|
||||
|
||||
This univariate algebraic kernel uses the Rs library to perform
|
||||
rational univariate polynomial root isolation. It is a model of the
|
||||
`AlgebraicKernel_d_1` concept. Due to the fact that RS can only
|
||||
isolate integer polynomials, the operations of this kernel have the
|
||||
overhead of converting the polynomials to integer.
|
||||
This univariate algebraic kernel uses the Rs library to perform
|
||||
rational univariate polynomial root isolation. It is a model of the
|
||||
`AlgebraicKernel_d_1` concept. Due to the fact that RS can only
|
||||
isolate integer polynomials, the operations of this kernel have the
|
||||
overhead of converting the polynomials to integer.
|
||||
|
||||
\cgalModels `AlgebraicKernel_d_1`
|
||||
|
||||
\sa `Algebraic_kernel_rs_gmpz_d_1`
|
||||
\sa `Algebraic_kernel_rs_gmpz_d_1`
|
||||
|
||||
*/
|
||||
|
||||
class Algebraic_kernel_rs_gmpq_d_1 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
It is a typedef to `CGAL::Gmpq`.
|
||||
*/
|
||||
typedef unspecified_type Coefficient;
|
||||
It is a typedef to `CGAL::Gmpq`.
|
||||
*/
|
||||
typedef unspecified_type Coefficient;
|
||||
|
||||
/*!
|
||||
It is defined as `CGAL::Polynomial<CGAL::Gmpq>`.
|
||||
*/
|
||||
typedef unspecified_type Polynomial_1;
|
||||
It is defined as `CGAL::Polynomial<CGAL::Gmpq>`.
|
||||
*/
|
||||
typedef unspecified_type Polynomial_1;
|
||||
|
||||
/*!
|
||||
Type that represents the real roots of
|
||||
integer univariate polynomials, containing a pointer to the polynomial of
|
||||
which the represented algebraic number is root and and a `CGAL::Gmpfi`
|
||||
isolating interval.
|
||||
*/
|
||||
typedef unspecified_type Algebraic_real_1;
|
||||
Type that represents the real roots of
|
||||
integer univariate polynomials, containing a pointer to the polynomial of
|
||||
which the represented algebraic number is root and and a `CGAL::Gmpfi`
|
||||
isolating interval.
|
||||
*/
|
||||
typedef unspecified_type Algebraic_real_1;
|
||||
|
||||
/*!
|
||||
Since the isolating intervals of the roots have type
|
||||
`CGAL::Gmpfi`, the bounds have type `CGAL::Gmpfr`.
|
||||
*/
|
||||
typedef unspecified_type Bound;
|
||||
Since the isolating intervals of the roots have type
|
||||
`CGAL::Gmpfi`, the bounds have type `CGAL::Gmpfr`.
|
||||
*/
|
||||
typedef unspecified_type Bound;
|
||||
|
||||
/*!
|
||||
The multiplicity is an `int`.
|
||||
*/
|
||||
typedef unspecified_type Multiplicity_type;
|
||||
The multiplicity is an `int`.
|
||||
*/
|
||||
typedef unspecified_type Multiplicity_type;
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,52 +4,52 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgAlgebraicKernelDModels
|
||||
|
||||
\anchor Algebraic_kernel_rs_gmpz_d_1
|
||||
\anchor Algebraic_kernel_rs_gmpz_d_1
|
||||
|
||||
This univariate algebraic kernel uses the Rs library to perform
|
||||
integer univariate polynomial root isolation. It is a model of the
|
||||
`AlgebraicKernel_d_1` concept.
|
||||
This univariate algebraic kernel uses the Rs library to perform
|
||||
integer univariate polynomial root isolation. It is a model of the
|
||||
`AlgebraicKernel_d_1` concept.
|
||||
|
||||
\cgalModels `AlgebraicKernel_d_1`
|
||||
|
||||
\sa `Algebraic_kernel_rs_gmpz_d_1`
|
||||
\sa `Algebraic_kernel_rs_gmpz_d_1`
|
||||
|
||||
*/
|
||||
|
||||
class Algebraic_kernel_rs_gmpz_d_1 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
It is a typedef to `CGAL::Gmpz`.
|
||||
*/
|
||||
typedef unspecified_type Coefficient;
|
||||
It is a typedef to `CGAL::Gmpz`.
|
||||
*/
|
||||
typedef unspecified_type Coefficient;
|
||||
|
||||
/*!
|
||||
It is defined as `CGAL::Polynomial<CGAL::Gmpz>`.
|
||||
*/
|
||||
typedef unspecified_type Polynomial_1;
|
||||
It is defined as `CGAL::Polynomial<CGAL::Gmpz>`.
|
||||
*/
|
||||
typedef unspecified_type Polynomial_1;
|
||||
|
||||
/*!
|
||||
Type that represents the real roots of
|
||||
integer univariate polynomials, containing a pointer to the polynomial of
|
||||
which the represented algebraic number is root and and a `CGAL::Gmpfi`
|
||||
isolating interval.
|
||||
*/
|
||||
typedef unspecified_type Algebraic_real_1;
|
||||
Type that represents the real roots of
|
||||
integer univariate polynomials, containing a pointer to the polynomial of
|
||||
which the represented algebraic number is root and and a `CGAL::Gmpfi`
|
||||
isolating interval.
|
||||
*/
|
||||
typedef unspecified_type Algebraic_real_1;
|
||||
|
||||
/*!
|
||||
Since the isolating intervals of the roots have type
|
||||
`CGAL::Gmpfi`, the bounds have type `CGAL::Gmpfr`.
|
||||
*/
|
||||
typedef unspecified_type Bound;
|
||||
Since the isolating intervals of the roots have type
|
||||
`CGAL::Gmpfi`, the bounds have type `CGAL::Gmpfr`.
|
||||
*/
|
||||
typedef unspecified_type Bound;
|
||||
|
||||
/*!
|
||||
The multiplicity is an `int`.
|
||||
*/
|
||||
typedef unspecified_type Multiplicity_type;
|
||||
The multiplicity is an `int`.
|
||||
*/
|
||||
typedef unspecified_type Multiplicity_type;
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
A model of `AlgebraicKernel_d_1::ApproximateAbsolute_1` is an `AdaptableBinaryFunction` that computes an
|
||||
approximation of an `AlgebraicKernel_d_1::Algebraic_real_1` value with
|
||||
respect to a given absolute precision.
|
||||
A model of `AlgebraicKernel_d_1::ApproximateAbsolute_1` is an `AdaptableBinaryFunction` that computes an
|
||||
approximation of an `AlgebraicKernel_d_1::Algebraic_real_1` value with
|
||||
respect to a given absolute precision.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
\sa `AlgebraicKernel_d_1::ApproximateRelative_1`
|
||||
|
||||
|
|
@ -16,44 +16,44 @@ respect to a given absolute precision.
|
|||
class AlgebraicKernel_d_1::ApproximateAbsolute_1 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef std::pair<AlgebraicKernel_d_1::Bound, AlgebraicKernel_d_1::Bound> result_type;
|
||||
*/
|
||||
typedef std::pair<AlgebraicKernel_d_1::Bound, AlgebraicKernel_d_1::Bound> result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Algebraic_real_1 first_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Algebraic_real_1 first_argument_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef int second_argument_type;
|
||||
*/
|
||||
typedef int second_argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
The function computes a pair \f$ p\f$ of `AlgebraicKernel_d_1::Bound`,
|
||||
where \f$ p.first\f$ represents the lower approximation and \f$ p.second\f$ represents
|
||||
the upper approximation. The pair \f$ p\f$ approximates the given value \f$ x\f$
|
||||
with respect to the given absolute precision \f$ a\f$.
|
||||
\post \f$ p.first <= x \f$
|
||||
\post \f$ x <= p.second \f$
|
||||
\post \f$ (x - p.first) <= 2^{-a} \f$
|
||||
\post \f$ (p.second - x) <= 2^{-a} \f$
|
||||
The function computes a pair \f$ p\f$ of `AlgebraicKernel_d_1::Bound`,
|
||||
where \f$ p.first\f$ represents the lower approximation and \f$ p.second\f$ represents
|
||||
the upper approximation. The pair \f$ p\f$ approximates the given value \f$ x\f$
|
||||
with respect to the given absolute precision \f$ a\f$.
|
||||
\post \f$ p.first <= x \f$
|
||||
\post \f$ x <= p.second \f$
|
||||
\post \f$ (x - p.first) <= 2^{-a} \f$
|
||||
\post \f$ (p.second - x) <= 2^{-a} \f$
|
||||
|
||||
*/
|
||||
result_type
|
||||
operator()(const first_argument_type & x,
|
||||
const second_argument_type & a );
|
||||
*/
|
||||
result_type
|
||||
operator()(const first_argument_type & x,
|
||||
const second_argument_type & a );
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
A model of `AlgebraicKernel_d_1::ApproximateRelative_1` is an `AdaptableBinaryFunction` that computes an
|
||||
approximation of an `AlgebraicKernel_d_1::Algebraic_real_1` value with
|
||||
respect to a given relative precision.
|
||||
A model of `AlgebraicKernel_d_1::ApproximateRelative_1` is an `AdaptableBinaryFunction` that computes an
|
||||
approximation of an `AlgebraicKernel_d_1::Algebraic_real_1` value with
|
||||
respect to a given relative precision.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
\sa `AlgebraicKernel_d_1::ApproximateAbsolute_1`
|
||||
|
||||
|
|
@ -16,44 +16,44 @@ respect to a given relative precision.
|
|||
class AlgebraicKernel_d_1::ApproximateRelative_1 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef std::pair<AlgebraicKernel_d_1::Bound, AlgebraicKernel_d_1::Bound> result_type;
|
||||
*/
|
||||
typedef std::pair<AlgebraicKernel_d_1::Bound, AlgebraicKernel_d_1::Bound> result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Algebraic_real_1 first_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Algebraic_real_1 first_argument_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef int second_argument_type;
|
||||
*/
|
||||
typedef int second_argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
The function computes a pair \f$ p\f$ of `AlgebraicKernel_d_1::Bound`,
|
||||
where \f$ p.first\f$ represents the lower approximation and \f$ p.second\f$ represents
|
||||
the upper approximation. The pair \f$ p\f$ approximates the given value \f$ x\f$
|
||||
with respect to the given relative precision \f$ r\f$.
|
||||
\post \f$ p.first <= x \f$
|
||||
\post \f$ x <= p.second \f$
|
||||
\post \f$ (x - p.first) <= 2^{-r} *|x|\f$
|
||||
\post \f$ (p.second - x) <= 2^{-r} *|x|\f$
|
||||
The function computes a pair \f$ p\f$ of `AlgebraicKernel_d_1::Bound`,
|
||||
where \f$ p.first\f$ represents the lower approximation and \f$ p.second\f$ represents
|
||||
the upper approximation. The pair \f$ p\f$ approximates the given value \f$ x\f$
|
||||
with respect to the given relative precision \f$ r\f$.
|
||||
\post \f$ p.first <= x \f$
|
||||
\post \f$ x <= p.second \f$
|
||||
\post \f$ (x - p.first) <= 2^{-r} *|x|\f$
|
||||
\post \f$ (p.second - x) <= 2^{-r} *|x|\f$
|
||||
|
||||
*/
|
||||
result_type
|
||||
operator()(const first_argument_type & x,
|
||||
const second_argument_type & r );
|
||||
*/
|
||||
result_type
|
||||
operator()(const first_argument_type & x,
|
||||
const second_argument_type & r );
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,52 +3,52 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Computes a number of type
|
||||
`AlgebraicKernel_d_1::Bound` in-between two
|
||||
`AlgebraicKernel_d_1::Algebraic_real_1` values.
|
||||
Computes a number of type
|
||||
`AlgebraicKernel_d_1::Bound` in-between two
|
||||
`AlgebraicKernel_d_1::Algebraic_real_1` values.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
*/
|
||||
|
||||
class AlgebraicKernel_d_1::BoundBetween_1 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Bound result_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Bound result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Algebraic_real_1 first_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Algebraic_real_1 first_argument_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Algebraic_real_1 second_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Algebraic_real_1 second_argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
Computes a value \f$ r\f$, which is between \f$ a\f$ and \f$ b\f$.
|
||||
Computes a value \f$ r\f$, which is between \f$ a\f$ and \f$ b\f$.
|
||||
|
||||
\pre \f$ a \neq b\f$
|
||||
\post \f$ r > min(a,b)\f$
|
||||
\post \f$ r < max(a,b)\f$
|
||||
\pre \f$ a \neq b\f$
|
||||
\post \f$ r > min(a,b)\f$
|
||||
\post \f$ r < max(a,b)\f$
|
||||
|
||||
*/
|
||||
result_type
|
||||
operator()(const first_argument_type & a,
|
||||
const second_argument_type & b);
|
||||
*/
|
||||
result_type
|
||||
operator()(const first_argument_type & a,
|
||||
const second_argument_type & b);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,58 +3,58 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Compares `AlgebraicKernel_d_1::Algebraic_real_1` values.
|
||||
Compares `AlgebraicKernel_d_1::Algebraic_real_1` values.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
*/
|
||||
class AlgebraicKernel_d_1::Compare_1 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Type convertible to `CGAL::Comparison_result`
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Type convertible to `CGAL::Comparison_result`
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Algebraic_real_1 first_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Algebraic_real_1 first_argument_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Algebraic_real_1 second_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Algebraic_real_1 second_argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// The following operators and their symmetric counterparts are
|
||||
/// required:
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Compares `a` and `b`.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_1::Algebraic_real_1 a, AlgebraicKernel_d_1::Algebraic_real_1 b);
|
||||
Compares `a` and `b`.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_1::Algebraic_real_1 a, AlgebraicKernel_d_1::Algebraic_real_1 b);
|
||||
|
||||
/*!
|
||||
Compares `a` and `b`.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_1::Algebraic_real_1 a, int b);
|
||||
Compares `a` and `b`.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_1::Algebraic_real_1 a, int b);
|
||||
|
||||
/*!
|
||||
Compares `a` and `b`.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_1::Algebraic_real_1 a, AlgebraicKernel_d_1::Bound b);
|
||||
Compares `a` and `b`.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_1::Algebraic_real_1 a, AlgebraicKernel_d_1::Bound b);
|
||||
|
||||
/*!
|
||||
Compares `a` and `b`.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_1::Algebraic_real_1 a, AlgebraicKernel_d_1::Coefficient b);
|
||||
Compares `a` and `b`.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_1::Algebraic_real_1 a, AlgebraicKernel_d_1::Coefficient b);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Computes a square free univariate polynomial \f$ p\f$, such that the given
|
||||
`AlgebraicKernel_d_1::Algebraic_real_1` is a root of \f$ p\f$.
|
||||
Computes a square free univariate polynomial \f$ p\f$, such that the given
|
||||
`AlgebraicKernel_d_1::Algebraic_real_1` is a root of \f$ p\f$.
|
||||
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
|
||||
\sa `AlgebraicKernel_d_1::Isolate_1`
|
||||
|
||||
|
|
@ -15,28 +15,28 @@ Computes a square free univariate polynomial \f$ p\f$, such that the given
|
|||
class AlgebraicKernel_d_1::ComputePolynomial_1 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Polynomial_1 result_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Polynomial_1 result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Algebraic_real_1 argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Algebraic_real_1 argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Computes a square free polynomial \f$ p\f$, such that \f$ x\f$ is a real root of \f$ p\f$.
|
||||
*/
|
||||
result_type operator()(argument_type x);
|
||||
Computes a square free polynomial \f$ p\f$, such that \f$ x\f$ is a real root of \f$ p\f$.
|
||||
*/
|
||||
result_type operator()(argument_type x);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Constructs `AlgebraicKernel_d_1::Algebraic_real_1`.
|
||||
Constructs `AlgebraicKernel_d_1::Algebraic_real_1`.
|
||||
|
||||
\cgalRefines `AdaptableFunctor`
|
||||
\cgalRefines `AdaptableFunctor`
|
||||
|
||||
\sa `AlgebraicKernel_d_2::ConstructAlgebraicReal_2`
|
||||
|
||||
|
|
@ -14,56 +14,56 @@ Constructs `AlgebraicKernel_d_1::Algebraic_real_1`.
|
|||
class AlgebraicKernel_d_1::ConstructAlgebraicReal_1 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Algebraic_real_1 result_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Algebraic_real_1 result_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
introduces an `AlgebraicKernel_d_1::Algebraic_real_1` initialized to \f$ a\f$.
|
||||
*/
|
||||
result_type operator()(int a);
|
||||
introduces an `AlgebraicKernel_d_1::Algebraic_real_1` initialized to \f$ a\f$.
|
||||
*/
|
||||
result_type operator()(int a);
|
||||
|
||||
/*!
|
||||
introduces an `AlgebraicKernel_d_1::Algebraic_real_1` initialized to \f$ a\f$.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_1::Bound a);
|
||||
introduces an `AlgebraicKernel_d_1::Algebraic_real_1` initialized to \f$ a\f$.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_1::Bound a);
|
||||
|
||||
/*!
|
||||
introduces an `AlgebraicKernel_d_1::Algebraic_real_1` initialized to \f$ a\f$.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_1::Coefficient a);
|
||||
introduces an `AlgebraicKernel_d_1::Algebraic_real_1` initialized to \f$ a\f$.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_1::Coefficient a);
|
||||
|
||||
/*!
|
||||
introduces an `AlgebraicKernel_d_1::Algebraic_real_1` initialized to the \f$ i\f$-th real root of \f$ p\f$.
|
||||
The index starts at \f$ 0\f$, that is, \f$ p\f$ must have at least \f$ i+1\f$ real roots.
|
||||
\pre \f$ p\f$ is square free.
|
||||
\pre \f$ p\f$ has at least \f$ i+1\f$ real roots.
|
||||
introduces an `AlgebraicKernel_d_1::Algebraic_real_1` initialized to the \f$ i\f$-th real root of \f$ p\f$.
|
||||
The index starts at \f$ 0\f$, that is, \f$ p\f$ must have at least \f$ i+1\f$ real roots.
|
||||
\pre \f$ p\f$ is square free.
|
||||
\pre \f$ p\f$ has at least \f$ i+1\f$ real roots.
|
||||
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_1::Polynomial_1 p, AlgebraicKernel_d_1::size_type i);
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_1::Polynomial_1 p, AlgebraicKernel_d_1::size_type i);
|
||||
|
||||
/*!
|
||||
introduces an `AlgebraicKernel_d_1::Algebraic_real_1` initialized to the
|
||||
only real root of \f$ p\f$ in the open interval \f$ I = (l,u)\f$.
|
||||
\pre \f$ l < u\f$
|
||||
\pre \f$ p\f$ is square free.
|
||||
\pre \f$ p\f$ has exactly one real root in \f$ I\f$
|
||||
\pre \f$ p\f$ has no real root on \f$ \partial I\f$
|
||||
introduces an `AlgebraicKernel_d_1::Algebraic_real_1` initialized to the
|
||||
only real root of \f$ p\f$ in the open interval \f$ I = (l,u)\f$.
|
||||
\pre \f$ l < u\f$
|
||||
\pre \f$ p\f$ is square free.
|
||||
\pre \f$ p\f$ has exactly one real root in \f$ I\f$
|
||||
\pre \f$ p\f$ has no real root on \f$ \partial I\f$
|
||||
|
||||
*/
|
||||
result_type operator()(
|
||||
AlgebraicKernel_d_1::Polynomial_1 p,
|
||||
AlgebraicKernel_d_1::Bound l,
|
||||
AlgebraicKernel_d_1::Bound u);
|
||||
*/
|
||||
result_type operator()(
|
||||
AlgebraicKernel_d_1::Polynomial_1 p,
|
||||
AlgebraicKernel_d_1::Bound l,
|
||||
AlgebraicKernel_d_1::Bound u);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Determines whether a given pair of univariate polynomials \f$ p_1, p_2\f$ is coprime,
|
||||
namely if \f$ \deg({\rm gcd}(p_1 ,p_2)) = 0\f$.
|
||||
Determines whether a given pair of univariate polynomials \f$ p_1, p_2\f$ is coprime,
|
||||
namely if \f$ \deg({\rm gcd}(p_1 ,p_2)) = 0\f$.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
\sa `AlgebraicKernel_d_1::MakeCoprime_1`
|
||||
|
||||
|
|
@ -15,35 +15,35 @@ namely if \f$ \deg({\rm gcd}(p_1 ,p_2)) = 0\f$.
|
|||
class AlgebraicKernel_d_1::IsCoprime_1 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef bool result_type;
|
||||
*/
|
||||
typedef bool result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Polynomial_1 first_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Polynomial_1 first_argument_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Polynomial_1 second_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Polynomial_1 second_argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Returns true if `p1` and `p2` are coprime.
|
||||
*/
|
||||
result_type
|
||||
operator()(const first_argument_type & p1,
|
||||
const second_argument_type & p2);
|
||||
Returns true if `p1` and `p2` are coprime.
|
||||
*/
|
||||
result_type
|
||||
operator()(const first_argument_type & p1,
|
||||
const second_argument_type & p2);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Computes whether the given univariate polynomial is square free.
|
||||
Computes whether the given univariate polynomial is square free.
|
||||
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
|
||||
\sa `AlgebraicKernel_d_1::MakeSquareFree_1`
|
||||
\sa `AlgebraicKernel_d_1::SquareFreeFactorize_1`
|
||||
|
|
@ -15,29 +15,29 @@ Computes whether the given univariate polynomial is square free.
|
|||
class AlgebraicKernel_d_1::IsSquareFree_1 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// A model of this type must provide:
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef bool result_type;
|
||||
*/
|
||||
typedef bool result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Polynomial_1 argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Polynomial_1 argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Returns true if \f$ p\f$ is square free.
|
||||
*/
|
||||
result_type operator()(argument_type p);
|
||||
Returns true if \f$ p\f$ is square free.
|
||||
*/
|
||||
result_type operator()(argument_type p);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Computes whether an `AlgebraicKernel_d_1::Polynomial_1`
|
||||
is zero at a given `AlgebraicKernel_d_1::Algebraic_real_1`.
|
||||
Computes whether an `AlgebraicKernel_d_1::Polynomial_1`
|
||||
is zero at a given `AlgebraicKernel_d_1::Algebraic_real_1`.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
\sa `AlgebraicKernel_d_1::SignAt_1`
|
||||
|
||||
|
|
@ -15,35 +15,35 @@ is zero at a given `AlgebraicKernel_d_1::Algebraic_real_1`.
|
|||
class AlgebraicKernel_d_1::IsZeroAt_1 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Type convertible to `bool`
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Type convertible to `bool`
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Polynomial_1 first_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Polynomial_1 first_argument_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Algebraic_real_1 second_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Algebraic_real_1 second_argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Computes whether \f$ p\f$ is zero at \f$ x\f$.
|
||||
*/
|
||||
result_type
|
||||
operator()(const first_argument_type & p,
|
||||
const second_argument_type & x);
|
||||
Computes whether \f$ p\f$ is zero at \f$ x\f$.
|
||||
*/
|
||||
result_type
|
||||
operator()(const first_argument_type & p,
|
||||
const second_argument_type & x);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Computes an open isolating interval for an `AlgebraicKernel_d_1::Algebraic_real_1`
|
||||
with respect to the real roots of a given univariate polynomial.
|
||||
Computes an open isolating interval for an `AlgebraicKernel_d_1::Algebraic_real_1`
|
||||
with respect to the real roots of a given univariate polynomial.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
\sa `AlgebraicKernel_d_1::ComputePolynomial_1`
|
||||
|
||||
|
|
@ -15,37 +15,37 @@ with respect to the real roots of a given univariate polynomial.
|
|||
class AlgebraicKernel_d_1::Isolate_1 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef std::pair<AlgebraicKernel_d_1::Bound,AlgebraicKernel_d_1::Bound> result_type;
|
||||
*/
|
||||
typedef std::pair<AlgebraicKernel_d_1::Bound,AlgebraicKernel_d_1::Bound> result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Algebraic_real_1 first_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Algebraic_real_1 first_argument_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Polynomial_1 second_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Polynomial_1 second_argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Computes an open isolating interval \f$ I=(l,u)\f$ for \f$ a\f$ with respect to the real roots of \f$ p\f$.
|
||||
It is not required that \f$ a\f$ is a root of \f$ p\f$.
|
||||
\post \f$ a \in I\f$.
|
||||
\post \f$ p(x) \neq0 | \forall x \in\overline{I}\backslash a\f$.
|
||||
Computes an open isolating interval \f$ I=(l,u)\f$ for \f$ a\f$ with respect to the real roots of \f$ p\f$.
|
||||
It is not required that \f$ a\f$ is a root of \f$ p\f$.
|
||||
\post \f$ a \in I\f$.
|
||||
\post \f$ p(x) \neq0 | \forall x \in\overline{I}\backslash a\f$.
|
||||
|
||||
*/
|
||||
result_type operator()(first_argument_type a, second_argument_type p);
|
||||
*/
|
||||
result_type operator()(first_argument_type a, second_argument_type p);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,20 +3,20 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Computes for a given pair of univariate polynomials \f$ p_1\f$, \f$ p_2\f$ their
|
||||
common part \f$ g\f$ up to a constant factor and coprime parts \f$ q_1\f$, \f$ q_2\f$
|
||||
respectively.
|
||||
Computes for a given pair of univariate polynomials \f$ p_1\f$, \f$ p_2\f$ their
|
||||
common part \f$ g\f$ up to a constant factor and coprime parts \f$ q_1\f$, \f$ q_2\f$
|
||||
respectively.
|
||||
|
||||
That is, it computes \f$ g, q_1, q_2\f$ such that:
|
||||
That is, it computes \f$ g, q_1, q_2\f$ such that:
|
||||
|
||||
\f$ c_1 \cdot p_1 = g \cdot q_1\f$ for some constant \f$ c_1\f$ and
|
||||
\f$ c_1 \cdot p_1 = g \cdot q_1\f$ for some constant \f$ c_1\f$ and
|
||||
|
||||
\f$ c_2 \cdot p_2 = g \cdot q_2\f$ for some constant \f$ c_2\f$,
|
||||
such that \f$ q_1\f$ and \f$ q_2\f$ are coprime.
|
||||
\f$ c_2 \cdot p_2 = g \cdot q_2\f$ for some constant \f$ c_2\f$,
|
||||
such that \f$ q_1\f$ and \f$ q_2\f$ are coprime.
|
||||
|
||||
It returns true if \f$ p_1\f$ and \f$ p_2\f$ are already coprime.
|
||||
It returns true if \f$ p_1\f$ and \f$ p_2\f$ are already coprime.
|
||||
|
||||
\cgalRefines `AdaptableFunctor` with five arguments
|
||||
\cgalRefines `AdaptableFunctor` with five arguments
|
||||
|
||||
\sa `AlgebraicKernel_d_1::IsCoprime_1`
|
||||
|
||||
|
|
@ -25,31 +25,31 @@ It returns true if \f$ p_1\f$ and \f$ p_2\f$ are already coprime.
|
|||
class AlgebraicKernel_d_1::MakeCoprime_1 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef bool result_type;
|
||||
*/
|
||||
typedef bool result_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Computes \f$ g, q_1, q_2\f$ as described above.
|
||||
Computes \f$ g, q_1, q_2\f$ as described above.
|
||||
|
||||
Returns whether \f$ p_1\f$ and \f$ p_2\f$ where already coprime.
|
||||
Returns whether \f$ p_1\f$ and \f$ p_2\f$ where already coprime.
|
||||
|
||||
*/
|
||||
result_type
|
||||
operator()(const AlgebraicKernel_d_1::Polynomial_1 & p1,
|
||||
const AlgebraicKernel_d_1::Polynomial_1 & p2,
|
||||
AlgebraicKernel_d_1::Polynomial_1 & g,
|
||||
AlgebraicKernel_d_1::Polynomial_1 & q1,
|
||||
AlgebraicKernel_d_1::Polynomial_1 & q2);
|
||||
*/
|
||||
result_type
|
||||
operator()(const AlgebraicKernel_d_1::Polynomial_1 & p1,
|
||||
const AlgebraicKernel_d_1::Polynomial_1 & p2,
|
||||
AlgebraicKernel_d_1::Polynomial_1 & g,
|
||||
AlgebraicKernel_d_1::Polynomial_1 & q1,
|
||||
AlgebraicKernel_d_1::Polynomial_1 & q2);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Returns a square free part of a univariate polynomial.
|
||||
Returns a square free part of a univariate polynomial.
|
||||
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
|
||||
\sa `AlgebraicKernel_d_1::IsSquareFree_1`
|
||||
\sa `AlgebraicKernel_d_1::SquareFreeFactorize_1`
|
||||
|
|
@ -15,28 +15,28 @@ Returns a square free part of a univariate polynomial.
|
|||
class AlgebraicKernel_d_1::MakeSquareFree_1 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Polynomial_1 result_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Polynomial_1 result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Polynomial_1 argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Polynomial_1 argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Returns a square free part of \f$ p\f$
|
||||
*/
|
||||
result_type operator()(argument_type p);
|
||||
Returns a square free part of \f$ p\f$
|
||||
*/
|
||||
result_type operator()(argument_type p);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Computes the number of real solutions of the given univariate polynomial.
|
||||
Computes the number of real solutions of the given univariate polynomial.
|
||||
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
|
||||
\sa `AlgebraicKernel_d_1::ConstructAlgebraicReal_1`
|
||||
|
||||
|
|
@ -14,30 +14,30 @@ Computes the number of real solutions of the given univariate polynomial.
|
|||
class AlgebraicKernel_d_1::NumberOfSolutions_1 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// A model of this type must provide:
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::size_type result_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::size_type result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Polynomial_1 argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Polynomial_1 argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Returns the number of real solutions of \f$ p\f$.
|
||||
\pre \f$ p\f$ is square free.
|
||||
*/
|
||||
result_type operator()(argument_type p);
|
||||
Returns the number of real solutions of \f$ p\f$.
|
||||
\pre \f$ p\f$ is square free.
|
||||
*/
|
||||
result_type operator()(argument_type p);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Computes the sign of a univariate polynomial
|
||||
`AlgebraicKernel_d_1::Polynomial_1` at a real value of type
|
||||
`AlgebraicKernel_d_1::Algebraic_real_1`.
|
||||
Computes the sign of a univariate polynomial
|
||||
`AlgebraicKernel_d_1::Polynomial_1` at a real value of type
|
||||
`AlgebraicKernel_d_1::Algebraic_real_1`.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
\sa `AlgebraicKernel_d_1::IsZeroAt_1`
|
||||
|
||||
|
|
@ -16,35 +16,35 @@ Computes the sign of a univariate polynomial
|
|||
class AlgebraicKernel_d_1::SignAt_1 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Type convertible to `CGAL::Sign`
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Type convertible to `CGAL::Sign`
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Polynomial_1 first_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Polynomial_1 first_argument_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Algebraic_real_1 second_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Algebraic_real_1 second_argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Computes the sign of \f$ p\f$ at \f$ x\f$.
|
||||
*/
|
||||
result_type
|
||||
operator()(const first_argument_type & p,
|
||||
const second_argument_type & x);
|
||||
Computes the sign of \f$ p\f$ at \f$ x\f$.
|
||||
*/
|
||||
result_type
|
||||
operator()(const first_argument_type & p,
|
||||
const second_argument_type & x);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,63 +3,63 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Computes the real roots of a univariate polynomial.
|
||||
Computes the real roots of a univariate polynomial.
|
||||
|
||||
\cgalRefines `Assignable`
|
||||
\cgalRefines `CopyConstructible`
|
||||
\cgalRefines `Assignable`
|
||||
\cgalRefines `CopyConstructible`
|
||||
|
||||
*/
|
||||
|
||||
class AlgebraicKernel_d_1::Solve_1 {
|
||||
public:
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// A model of this type must provide:
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Computes all real solutions of \f$ p\f$ with multiplicity, and copies them as objects of type
|
||||
`std::pair<AlgebraicKernel_d_1::Algebraic_real_1, AlgebraicKernel_d_1::Multiplicity_type>` in `res`.
|
||||
*/
|
||||
template < class OutputIterator >
|
||||
OutputIterator
|
||||
operator()( AlgebraicKernel_d_1::Polynomial_1 p,
|
||||
OutputIterator res);
|
||||
Computes all real solutions of \f$ p\f$ with multiplicity, and copies them as objects of type
|
||||
`std::pair<AlgebraicKernel_d_1::Algebraic_real_1, AlgebraicKernel_d_1::Multiplicity_type>` in `res`.
|
||||
*/
|
||||
template < class OutputIterator >
|
||||
OutputIterator
|
||||
operator()( AlgebraicKernel_d_1::Polynomial_1 p,
|
||||
OutputIterator res);
|
||||
|
||||
/*!
|
||||
Computes all real solutions of \f$ p\f$, and copies them as objects of type
|
||||
`AlgebraicKernel_d_1::Algebraic_real_1` in `res`.
|
||||
The `bool` `known_to_be_square_free` indicates whether \f$ p\f$ is known to be square free.
|
||||
Each root, though it might be a multiple root, is reported only once.
|
||||
*/
|
||||
template < class OutputIterator >
|
||||
OutputIterator
|
||||
operator()(
|
||||
AlgebraicKernel_d_1::Polynomial_1 p,
|
||||
bool known_to_be_square_free,
|
||||
OutputIterator res );
|
||||
Computes all real solutions of \f$ p\f$, and copies them as objects of type
|
||||
`AlgebraicKernel_d_1::Algebraic_real_1` in `res`.
|
||||
The `bool` `known_to_be_square_free` indicates whether \f$ p\f$ is known to be square free.
|
||||
Each root, though it might be a multiple root, is reported only once.
|
||||
*/
|
||||
template < class OutputIterator >
|
||||
OutputIterator
|
||||
operator()(
|
||||
AlgebraicKernel_d_1::Polynomial_1 p,
|
||||
bool known_to_be_square_free,
|
||||
OutputIterator res );
|
||||
|
||||
/*!
|
||||
Computes all real solutions of \f$ p\f$ in the closed interval \f$ [l,u]\f$ with multiplicity, and copies them as objects of type
|
||||
`std::pair<AlgebraicKernel_d_1::Algebraic_real_1, AlgebraicKernel_d_1::Multiplicity_type>` in `res`.
|
||||
*/
|
||||
template < class OutputIterator >
|
||||
OutputIterator
|
||||
operator()( AlgebraicKernel_d_1::Polynomial_1 p, AlgebraicKernel_d_1::Bound l, AlgebraicKernel_d_1::Bound u,
|
||||
OutputIterator res);
|
||||
Computes all real solutions of \f$ p\f$ in the closed interval \f$ [l,u]\f$ with multiplicity, and copies them as objects of type
|
||||
`std::pair<AlgebraicKernel_d_1::Algebraic_real_1, AlgebraicKernel_d_1::Multiplicity_type>` in `res`.
|
||||
*/
|
||||
template < class OutputIterator >
|
||||
OutputIterator
|
||||
operator()( AlgebraicKernel_d_1::Polynomial_1 p, AlgebraicKernel_d_1::Bound l, AlgebraicKernel_d_1::Bound u,
|
||||
OutputIterator res);
|
||||
|
||||
/*!
|
||||
Computes all real solutions of \f$ p\f$ in the closed interval \f$ [l,u]\f$, and copies them as objects of
|
||||
type `AlgebraicKernel_d_1::Algebraic_real_1` in `res`.
|
||||
The `bool` `known_to_be_square_free` indicates whether \f$ p\f$ is known to be square free.
|
||||
Each root, though it might be a multiple root, is reported only once.
|
||||
*/
|
||||
template < class OutputIterator > OutputIterator operator()(
|
||||
AlgebraicKernel_d_1::Polynomial_1 p,
|
||||
bool known_to_be_square_free,
|
||||
AlgebraicKernel_d_1::Bound l,
|
||||
AlgebraicKernel_d_1::Bound u,
|
||||
OutputIterator res);
|
||||
Computes all real solutions of \f$ p\f$ in the closed interval \f$ [l,u]\f$, and copies them as objects of
|
||||
type `AlgebraicKernel_d_1::Algebraic_real_1` in `res`.
|
||||
The `bool` `known_to_be_square_free` indicates whether \f$ p\f$ is known to be square free.
|
||||
Each root, though it might be a multiple root, is reported only once.
|
||||
*/
|
||||
template < class OutputIterator > OutputIterator operator()(
|
||||
AlgebraicKernel_d_1::Polynomial_1 p,
|
||||
bool known_to_be_square_free,
|
||||
AlgebraicKernel_d_1::Bound l,
|
||||
AlgebraicKernel_d_1::Bound u,
|
||||
OutputIterator res);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,19 +3,19 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Computes a square free factorization of an
|
||||
`AlgebraicKernel_d_1::Polynomial_1`.
|
||||
Computes a square free factorization of an
|
||||
`AlgebraicKernel_d_1::Polynomial_1`.
|
||||
|
||||
A polynomial \f$ p\f$ is factored into square free and pairwise
|
||||
coprime non-constant factors \f$ q_i\f$ with multiplicities \f$ m_i\f$
|
||||
and a constant factor \f$ c\f$, such that
|
||||
\f$ p = c \cdot q_1^{m_1} \cdot ... \cdot q_n^{m_n}\f$.
|
||||
A polynomial \f$ p\f$ is factored into square free and pairwise
|
||||
coprime non-constant factors \f$ q_i\f$ with multiplicities \f$ m_i\f$
|
||||
and a constant factor \f$ c\f$, such that
|
||||
\f$ p = c \cdot q_1^{m_1} \cdot ... \cdot q_n^{m_n}\f$.
|
||||
|
||||
The factor multiplicity pairs \f$ <q_i,m_i>\f$ are written to the
|
||||
given output iterator. The constant factor \f$ c\f$ is not computed.
|
||||
The factor multiplicity pairs \f$ <q_i,m_i>\f$ are written to the
|
||||
given output iterator. The constant factor \f$ c\f$ is not computed.
|
||||
|
||||
\cgalRefines `Assignable`
|
||||
\cgalRefines `CopyConstructible`
|
||||
\cgalRefines `Assignable`
|
||||
\cgalRefines `CopyConstructible`
|
||||
|
||||
\sa `AlgebraicKernel_d_1::IsSquareFree_1`
|
||||
\sa `AlgebraicKernel_d_1::MakeSquareFree_1`
|
||||
|
|
@ -25,18 +25,18 @@ given output iterator. The constant factor \f$ c\f$ is not computed.
|
|||
class AlgebraicKernel_d_1::SquareFreeFactorize_1 {
|
||||
public:
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Copies in the output iterator the factors of a square free
|
||||
factorization of \f$ p\f$, with their multiplicity, as objects of type
|
||||
`std::pair<AlgebraicKernel_d_1::Polynomial_1, AlgebraicKernel_d_1::Multiplicity_type>`.
|
||||
*/
|
||||
template < class OutputIterator >
|
||||
OutputIterator
|
||||
operator()(AlgebraicKernel_d_1::Polynomial_1 p,
|
||||
OutputIterator res);
|
||||
Copies in the output iterator the factors of a square free
|
||||
factorization of \f$ p\f$, with their multiplicity, as objects of type
|
||||
`std::pair<AlgebraicKernel_d_1::Polynomial_1, AlgebraicKernel_d_1::Multiplicity_type>`.
|
||||
*/
|
||||
template < class OutputIterator >
|
||||
OutputIterator
|
||||
operator()(AlgebraicKernel_d_1::Polynomial_1 p,
|
||||
OutputIterator res);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,157 +3,157 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
A model of the `AlgebraicKernel_d_1` concept is meant to provide the
|
||||
algebraic functionalities on univariate polynomials of general degree \f$ d\f$.
|
||||
A model of the `AlgebraicKernel_d_1` concept is meant to provide the
|
||||
algebraic functionalities on univariate polynomials of general degree \f$ d\f$.
|
||||
|
||||
\cgalRefines `CopyConstructible`
|
||||
\cgalRefines `Assignable`
|
||||
\cgalRefines `CopyConstructible`
|
||||
\cgalRefines `Assignable`
|
||||
|
||||
\cgalHasModel `CGAL::Algebraic_kernel_rs_gmpz_d_1`
|
||||
\cgalHasModel `CGAL::Algebraic_kernel_rs_gmpq_d_1`
|
||||
|
||||
\sa `AlgebraicKernel_d_2`
|
||||
|
||||
A model of `AlgebraicKernel_d_1` must provide:
|
||||
A model of `AlgebraicKernel_d_1` must provide:
|
||||
*/
|
||||
|
||||
class AlgebraicKernel_d_1 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
A model of `IntegralDomain` and `RealEmbeddable`.
|
||||
A model of `IntegralDomain` and `RealEmbeddable`.
|
||||
|
||||
`ExplicitInteroperable` with `AlgebraicKernel_d_1::Bound`.
|
||||
`ExplicitInteroperable` with `AlgebraicKernel_d_1::Bound`.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Coefficient;
|
||||
*/
|
||||
typedef unspecified_type Coefficient;
|
||||
|
||||
/*!
|
||||
|
||||
A univariate polynomial that is a model of `Polynomial_d`,
|
||||
A univariate polynomial that is a model of `Polynomial_d`,
|
||||
where \link PolynomialTraits_d::Innermost_coefficient_type `CGAL::Polynomial_traits_d<Polynomial_1>::Innermost_coefficient_type` \endlink
|
||||
is `AlgebraicKernel_d_1::Coefficient`.
|
||||
is `AlgebraicKernel_d_1::Coefficient`.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Polynomial_1;
|
||||
*/
|
||||
typedef unspecified_type Polynomial_1;
|
||||
|
||||
/*!
|
||||
|
||||
A type that is used to represent real roots of univariate polynomials.
|
||||
The type must be a model of `DefaultConstructible`,
|
||||
`CopyConstructible`, `Assignable` and `RealEmbeddable`.
|
||||
A type that is used to represent real roots of univariate polynomials.
|
||||
The type must be a model of `DefaultConstructible`,
|
||||
`CopyConstructible`, `Assignable` and `RealEmbeddable`.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Algebraic_real_1;
|
||||
*/
|
||||
typedef unspecified_type Algebraic_real_1;
|
||||
|
||||
/*!
|
||||
|
||||
A type to represent upper and lower bounds of `AlgebraicKernel_d_1::Algebraic_real_1`.
|
||||
A type to represent upper and lower bounds of `AlgebraicKernel_d_1::Algebraic_real_1`.
|
||||
|
||||
The type is `ExplicitInteroperable` with
|
||||
`AlgebraicKernel_d_1::Coefficient` and must be a model
|
||||
`IntegralDomain`, `RealEmbeddable` and dense in \f$ \mathbb{R}\f$.
|
||||
The type is `ExplicitInteroperable` with
|
||||
`AlgebraicKernel_d_1::Coefficient` and must be a model
|
||||
`IntegralDomain`, `RealEmbeddable` and dense in \f$ \mathbb{R}\f$.
|
||||
|
||||
*/
|
||||
typedef unspecified_type Bound;
|
||||
*/
|
||||
typedef unspecified_type Bound;
|
||||
|
||||
/*!
|
||||
Size type (unsigned integral type).
|
||||
*/
|
||||
typedef unspecified_type size_type;
|
||||
Size type (unsigned integral type).
|
||||
*/
|
||||
typedef unspecified_type size_type;
|
||||
|
||||
/*!
|
||||
Multiplicity type (unsigned integral type).
|
||||
*/
|
||||
typedef unspecified_type Multiplicity_type;
|
||||
Multiplicity type (unsigned integral type).
|
||||
*/
|
||||
typedef unspecified_type Multiplicity_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Functors
|
||||
/// \name Functors
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
A model of `AlgebraicKernel_d_1::ConstructAlgebraicReal_1`.
|
||||
*/
|
||||
typedef unspecified_type Construct_algebraic_real_1;
|
||||
A model of `AlgebraicKernel_d_1::ConstructAlgebraicReal_1`.
|
||||
*/
|
||||
typedef unspecified_type Construct_algebraic_real_1;
|
||||
|
||||
/*!
|
||||
A model of `AlgebraicKernel_d_1::ComputePolynomial_1`.
|
||||
*/
|
||||
typedef unspecified_type Compute_polynomial_1;
|
||||
A model of `AlgebraicKernel_d_1::ComputePolynomial_1`.
|
||||
*/
|
||||
typedef unspecified_type Compute_polynomial_1;
|
||||
|
||||
/*!
|
||||
A model of `AlgebraicKernel_d_1::Isolate_1`.
|
||||
*/
|
||||
typedef unspecified_type Isolate_1;
|
||||
A model of `AlgebraicKernel_d_1::Isolate_1`.
|
||||
*/
|
||||
typedef unspecified_type Isolate_1;
|
||||
|
||||
/*!
|
||||
A model of `AlgebraicKernel_d_1::IsSquareFree_1`.
|
||||
*/
|
||||
typedef unspecified_type Is_square_free_1;
|
||||
A model of `AlgebraicKernel_d_1::IsSquareFree_1`.
|
||||
*/
|
||||
typedef unspecified_type Is_square_free_1;
|
||||
|
||||
/*!
|
||||
A model of `AlgebraicKernel_d_1::MakeSquareFree_1`.
|
||||
*/
|
||||
typedef unspecified_type Make_square_free_1;
|
||||
A model of `AlgebraicKernel_d_1::MakeSquareFree_1`.
|
||||
*/
|
||||
typedef unspecified_type Make_square_free_1;
|
||||
|
||||
/*!
|
||||
A model of `AlgebraicKernel_d_1::SquareFreeFactorize_1`.
|
||||
*/
|
||||
typedef unspecified_type Square_free_factorize_1;
|
||||
A model of `AlgebraicKernel_d_1::SquareFreeFactorize_1`.
|
||||
*/
|
||||
typedef unspecified_type Square_free_factorize_1;
|
||||
|
||||
/*!
|
||||
A model of `AlgebraicKernel_d_1::IsCoprime_1`.
|
||||
*/
|
||||
typedef unspecified_type Is_coprime_1;
|
||||
A model of `AlgebraicKernel_d_1::IsCoprime_1`.
|
||||
*/
|
||||
typedef unspecified_type Is_coprime_1;
|
||||
|
||||
/*!
|
||||
A model of `AlgebraicKernel_d_1::MakeCoprime_1`.
|
||||
*/
|
||||
typedef unspecified_type Make_coprime_1;
|
||||
A model of `AlgebraicKernel_d_1::MakeCoprime_1`.
|
||||
*/
|
||||
typedef unspecified_type Make_coprime_1;
|
||||
|
||||
/*!
|
||||
A model of `AlgebraicKernel_d_1::Solve_1`.
|
||||
*/
|
||||
typedef unspecified_type Solve_1;
|
||||
A model of `AlgebraicKernel_d_1::Solve_1`.
|
||||
*/
|
||||
typedef unspecified_type Solve_1;
|
||||
|
||||
/*!
|
||||
A model of `AlgebraicKernel_d_1::NumberOfSolutions_1`.
|
||||
*/
|
||||
typedef unspecified_type Number_of_solutions_1;
|
||||
A model of `AlgebraicKernel_d_1::NumberOfSolutions_1`.
|
||||
*/
|
||||
typedef unspecified_type Number_of_solutions_1;
|
||||
|
||||
/*!
|
||||
A model of `AlgebraicKernel_d_1::SignAt_1`.
|
||||
*/
|
||||
typedef unspecified_type Sign_at_1;
|
||||
A model of `AlgebraicKernel_d_1::SignAt_1`.
|
||||
*/
|
||||
typedef unspecified_type Sign_at_1;
|
||||
|
||||
/*!
|
||||
A model of `AlgebraicKernel_d_1::Compare_1`.
|
||||
*/
|
||||
typedef unspecified_type Compare_1;
|
||||
A model of `AlgebraicKernel_d_1::Compare_1`.
|
||||
*/
|
||||
typedef unspecified_type Compare_1;
|
||||
|
||||
/*!
|
||||
A model of `AlgebraicKernel_d_1::BoundBetween_1`.
|
||||
*/
|
||||
typedef unspecified_type Bound_between_1;
|
||||
A model of `AlgebraicKernel_d_1::BoundBetween_1`.
|
||||
*/
|
||||
typedef unspecified_type Bound_between_1;
|
||||
|
||||
/*!
|
||||
A model of `AlgebraicKernel_d_1::ApproximateAbsolute_1`.
|
||||
*/
|
||||
typedef unspecified_type Approximate_absolute_1;
|
||||
A model of `AlgebraicKernel_d_1::ApproximateAbsolute_1`.
|
||||
*/
|
||||
typedef unspecified_type Approximate_absolute_1;
|
||||
|
||||
/*!
|
||||
A model of `AlgebraicKernel_d_1::ApproximateRelative_1`.
|
||||
*/
|
||||
typedef unspecified_type Approximate_relative_1;
|
||||
A model of `AlgebraicKernel_d_1::ApproximateRelative_1`.
|
||||
*/
|
||||
typedef unspecified_type Approximate_relative_1;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// For each of the function objects above, there must exist a member
|
||||
/// function that requires no arguments and returns an instance of
|
||||
/// that function object. The name of the member function is the
|
||||
|
|
@ -165,8 +165,8 @@ typedef unspecified_type Approximate_relative_1;
|
|||
|
||||
/*!
|
||||
|
||||
*/
|
||||
AlgebraicKernel_d_1::Bound_between_1 bound_between_1_object() const;
|
||||
*/
|
||||
AlgebraicKernel_d_1::Bound_between_1 bound_between_1_object() const;
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
A model of `AlgebraicKernel_d_2::ApproximateAbsoluteX_2` is an `AdaptableBinaryFunction` that computes an
|
||||
approximation of the \f$ x\f$-coordinate of an `AlgebraicKernel_d_2::Algebraic_real_2` value
|
||||
with respect to a given absolute precision.
|
||||
A model of `AlgebraicKernel_d_2::ApproximateAbsoluteX_2` is an `AdaptableBinaryFunction` that computes an
|
||||
approximation of the \f$ x\f$-coordinate of an `AlgebraicKernel_d_2::Algebraic_real_2` value
|
||||
with respect to a given absolute precision.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
\sa `AlgebraicKernel_d_2::ApproximateRelativeX_2`
|
||||
\sa `AlgebraicKernel_d_1::ApproximateAbsolute_1`
|
||||
|
|
@ -18,45 +18,45 @@ with respect to a given absolute precision.
|
|||
class AlgebraicKernel_d_2::ApproximateAbsoluteX_2 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef std::pair<AlgebraicKernel_d_1::Bound, AlgebraicKernel_d_1::Bound> result_type;
|
||||
*/
|
||||
typedef std::pair<AlgebraicKernel_d_1::Bound, AlgebraicKernel_d_1::Bound> result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 first_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 first_argument_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef int second_argument_type;
|
||||
*/
|
||||
typedef int second_argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
The function computes a pair \f$ p\f$ of `AlgebraicKernel_d_1::Bound`,
|
||||
where \f$ p.first\f$ represents the lower approximation and \f$ p.second\f$ represents
|
||||
the upper approximation. The pair \f$ p\f$ approximates the \f$ x\f$-coordinate \f$ x\f$
|
||||
of the `AlgebraicKernel_d_2::Algebraic_real_2` value \f$ v\f$ with respect to
|
||||
the absolute precision \f$ a\f$.
|
||||
\post \f$ p.first <= x \f$
|
||||
\post \f$ x <= p.second \f$
|
||||
\post \f$ (x - p.first) <= 2^{-a} \f$
|
||||
\post \f$ (p.second - x) <= 2^{-a} \f$
|
||||
The function computes a pair \f$ p\f$ of `AlgebraicKernel_d_1::Bound`,
|
||||
where \f$ p.first\f$ represents the lower approximation and \f$ p.second\f$ represents
|
||||
the upper approximation. The pair \f$ p\f$ approximates the \f$ x\f$-coordinate \f$ x\f$
|
||||
of the `AlgebraicKernel_d_2::Algebraic_real_2` value \f$ v\f$ with respect to
|
||||
the absolute precision \f$ a\f$.
|
||||
\post \f$ p.first <= x \f$
|
||||
\post \f$ x <= p.second \f$
|
||||
\post \f$ (x - p.first) <= 2^{-a} \f$
|
||||
\post \f$ (p.second - x) <= 2^{-a} \f$
|
||||
|
||||
*/
|
||||
result_type
|
||||
operator()(const first_argument_type & v,
|
||||
const second_argument_type & a );
|
||||
*/
|
||||
result_type
|
||||
operator()(const first_argument_type & v,
|
||||
const second_argument_type & a );
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
A model of `AlgebraicKernel_d_2::ApproximateAbsoluteY_2` is an `AdaptableBinaryFunction` that computes an
|
||||
approximation of the \f$ y\f$-coordinate of an `AlgebraicKernel_d_2::Algebraic_real_2` value
|
||||
with respect to a given absolute precision.
|
||||
A model of `AlgebraicKernel_d_2::ApproximateAbsoluteY_2` is an `AdaptableBinaryFunction` that computes an
|
||||
approximation of the \f$ y\f$-coordinate of an `AlgebraicKernel_d_2::Algebraic_real_2` value
|
||||
with respect to a given absolute precision.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
\sa `AlgebraicKernel_d_2::ApproximateRelativeY_2`
|
||||
\sa `AlgebraicKernel_d_1::ApproximateAbsolute_1`
|
||||
|
|
@ -18,45 +18,45 @@ with respect to a given absolute precision.
|
|||
class AlgebraicKernel_d_2::ApproximateAbsoluteY_2 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef std::pair<AlgebraicKernel_d_1::Bound, AlgebraicKernel_d_1::Bound> result_type;
|
||||
*/
|
||||
typedef std::pair<AlgebraicKernel_d_1::Bound, AlgebraicKernel_d_1::Bound> result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 first_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 first_argument_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef int second_argument_type;
|
||||
*/
|
||||
typedef int second_argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
The function computes a pair \f$ p\f$ of `AlgebraicKernel_d_1::Bound`,
|
||||
where \f$ p.first\f$ represents the lower approximation and \f$ p.second\f$ represents
|
||||
the upper approximation. The pair \f$ p\f$ approximates the \f$ y\f$-coordinate \f$ y\f$
|
||||
of the `AlgebraicKernel_d_2::Algebraic_real_2` value \f$ v\f$ with respect to
|
||||
the absolute precision \f$ a\f$.
|
||||
\post \f$ p.first <= y \f$
|
||||
\post \f$ y <= p.second \f$
|
||||
\post \f$ (y - p.first) <= 2^{-a} \f$
|
||||
\post \f$ (p.second - y) <= 2^{-a} \f$
|
||||
The function computes a pair \f$ p\f$ of `AlgebraicKernel_d_1::Bound`,
|
||||
where \f$ p.first\f$ represents the lower approximation and \f$ p.second\f$ represents
|
||||
the upper approximation. The pair \f$ p\f$ approximates the \f$ y\f$-coordinate \f$ y\f$
|
||||
of the `AlgebraicKernel_d_2::Algebraic_real_2` value \f$ v\f$ with respect to
|
||||
the absolute precision \f$ a\f$.
|
||||
\post \f$ p.first <= y \f$
|
||||
\post \f$ y <= p.second \f$
|
||||
\post \f$ (y - p.first) <= 2^{-a} \f$
|
||||
\post \f$ (p.second - y) <= 2^{-a} \f$
|
||||
|
||||
*/
|
||||
result_type
|
||||
operator()(const first_argument_type & v,
|
||||
const second_argument_type & a );
|
||||
*/
|
||||
result_type
|
||||
operator()(const first_argument_type & v,
|
||||
const second_argument_type & a );
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
A model of `AlgebraicKernel_d_2::ApproximateRelativeX_2` is an `AdaptableBinaryFunction` that computes an
|
||||
approximation of the \f$ x\f$-coordinate of an `AlgebraicKernel_d_2::Algebraic_real_2` value
|
||||
with respect to a given relative precision.
|
||||
A model of `AlgebraicKernel_d_2::ApproximateRelativeX_2` is an `AdaptableBinaryFunction` that computes an
|
||||
approximation of the \f$ x\f$-coordinate of an `AlgebraicKernel_d_2::Algebraic_real_2` value
|
||||
with respect to a given relative precision.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
\sa `AlgebraicKernel_d_2::ApproximateAbsoluteY_2`
|
||||
\sa `AlgebraicKernel_d_1::ApproximateAbsolute_1`
|
||||
|
|
@ -18,45 +18,45 @@ with respect to a given relative precision.
|
|||
class AlgebraicKernel_d_2::ApproximateRelativeX_2 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef std::pair<AlgebraicKernel_d_1::Bound, AlgebraicKernel_d_1::Bound> result_type;
|
||||
*/
|
||||
typedef std::pair<AlgebraicKernel_d_1::Bound, AlgebraicKernel_d_1::Bound> result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 first_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 first_argument_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef int second_argument_type;
|
||||
*/
|
||||
typedef int second_argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
The function computes a pair \f$ p\f$ of `AlgebraicKernel_d_1::Bound`,
|
||||
where \f$ p.first\f$ represents the lower approximation and \f$ p.second\f$ represents
|
||||
the upper approximation. The pair \f$ p\f$ approximates the \f$ x\f$-coordinate \f$ x\f$
|
||||
of the `AlgebraicKernel_d_2::Algebraic_real_2` value \f$ v\f$ with respect to
|
||||
the relative precision \f$ a\f$.
|
||||
\post \f$ p.first <= x \f$
|
||||
\post \f$ x <= p.second \f$
|
||||
\post \f$ (x - p.first) <= 2^{-a} |x|\f$
|
||||
\post \f$ (p.second - x) <= 2^{-a} |x|\f$
|
||||
The function computes a pair \f$ p\f$ of `AlgebraicKernel_d_1::Bound`,
|
||||
where \f$ p.first\f$ represents the lower approximation and \f$ p.second\f$ represents
|
||||
the upper approximation. The pair \f$ p\f$ approximates the \f$ x\f$-coordinate \f$ x\f$
|
||||
of the `AlgebraicKernel_d_2::Algebraic_real_2` value \f$ v\f$ with respect to
|
||||
the relative precision \f$ a\f$.
|
||||
\post \f$ p.first <= x \f$
|
||||
\post \f$ x <= p.second \f$
|
||||
\post \f$ (x - p.first) <= 2^{-a} |x|\f$
|
||||
\post \f$ (p.second - x) <= 2^{-a} |x|\f$
|
||||
|
||||
*/
|
||||
result_type
|
||||
operator()(const first_argument_type & v,
|
||||
const second_argument_type & a );
|
||||
*/
|
||||
result_type
|
||||
operator()(const first_argument_type & v,
|
||||
const second_argument_type & a );
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
A model of `AlgebraicKernel_d_2::ApproximateRelativeY_2` is an `AdaptableBinaryFunction` that computes an
|
||||
approximation of the \f$ y\f$-coordinate of an `AlgebraicKernel_d_2::Algebraic_real_2` value
|
||||
with respect to a given relative precision.
|
||||
A model of `AlgebraicKernel_d_2::ApproximateRelativeY_2` is an `AdaptableBinaryFunction` that computes an
|
||||
approximation of the \f$ y\f$-coordinate of an `AlgebraicKernel_d_2::Algebraic_real_2` value
|
||||
with respect to a given relative precision.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
\sa `AlgebraicKernel_d_2::ApproximateAbsoluteY_2`
|
||||
\sa `AlgebraicKernel_d_1::ApproximateAbsolute_1`
|
||||
|
|
@ -18,45 +18,45 @@ with respect to a given relative precision.
|
|||
class AlgebraicKernel_d_2::ApproximateRelativeY_2 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef std::pair<AlgebraicKernel_d_1::Bound, AlgebraicKernel_d_1::Bound> result_type;
|
||||
*/
|
||||
typedef std::pair<AlgebraicKernel_d_1::Bound, AlgebraicKernel_d_1::Bound> result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 first_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 first_argument_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef int second_argument_type;
|
||||
*/
|
||||
typedef int second_argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
The function computes a pair \f$ p\f$ of `AlgebraicKernel_d_1::Bound`,
|
||||
where \f$ p.first\f$ represents the lower approximation and \f$ p.second\f$ represents
|
||||
the upper approximation. The pair \f$ p\f$ approximates the \f$ y\f$-coordinate \f$ y\f$
|
||||
of the `AlgebraicKernel_d_2::Algebraic_real_2` value \f$ v\f$ with respect to
|
||||
the relative precision \f$ a\f$.
|
||||
\post \f$ p.first <= y \f$
|
||||
\post \f$ y <= p.second \f$
|
||||
\post \f$ (y - p.first) <= 2^{-a} |y|\f$
|
||||
\post \f$ (p.second - y) <= 2^{-a} |y|\f$
|
||||
The function computes a pair \f$ p\f$ of `AlgebraicKernel_d_1::Bound`,
|
||||
where \f$ p.first\f$ represents the lower approximation and \f$ p.second\f$ represents
|
||||
the upper approximation. The pair \f$ p\f$ approximates the \f$ y\f$-coordinate \f$ y\f$
|
||||
of the `AlgebraicKernel_d_2::Algebraic_real_2` value \f$ v\f$ with respect to
|
||||
the relative precision \f$ a\f$.
|
||||
\post \f$ p.first <= y \f$
|
||||
\post \f$ y <= p.second \f$
|
||||
\post \f$ (y - p.first) <= 2^{-a} |y|\f$
|
||||
\post \f$ (p.second - y) <= 2^{-a} |y|\f$
|
||||
|
||||
*/
|
||||
result_type
|
||||
operator()(const first_argument_type & v,
|
||||
const second_argument_type & a );
|
||||
*/
|
||||
result_type
|
||||
operator()(const first_argument_type & v,
|
||||
const second_argument_type & a );
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Computes a number of type
|
||||
`AlgebraicKernel_d_1::Bound` in-between the first coordinates of two
|
||||
`AlgebraicKernel_d_2::AlgebraicReal_2`.
|
||||
Computes a number of type
|
||||
`AlgebraicKernel_d_1::Bound` in-between the first coordinates of two
|
||||
`AlgebraicKernel_d_2::AlgebraicReal_2`.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
\sa `AlgebraicKernel_d_2::BoundBetweenY_2`
|
||||
|
||||
|
|
@ -16,39 +16,39 @@ Computes a number of type
|
|||
class AlgebraicKernel_d_2::BoundBetweenX_2 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Bound result_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Bound result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 first_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 first_argument_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 second_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 second_argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
Computes a number of type `AlgebraicKernel_d_1::Bound`
|
||||
in-between the first coordinates of \f$ a\f$ and \f$ b\f$.
|
||||
\pre \f$ a_x \neq b_x\f$.
|
||||
Computes a number of type `AlgebraicKernel_d_1::Bound`
|
||||
in-between the first coordinates of \f$ a\f$ and \f$ b\f$.
|
||||
\pre \f$ a_x \neq b_x\f$.
|
||||
|
||||
*/
|
||||
result_type
|
||||
operator()(const first_argument_type & a,
|
||||
const second_argument_type & b);
|
||||
*/
|
||||
result_type
|
||||
operator()(const first_argument_type & a,
|
||||
const second_argument_type & b);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Computes a number of type
|
||||
`AlgebraicKernel_d_1::Bound` in-between the second coordinates of two
|
||||
`AlgebraicKernel_d_2::AlgebraicReal_2`.
|
||||
Computes a number of type
|
||||
`AlgebraicKernel_d_1::Bound` in-between the second coordinates of two
|
||||
`AlgebraicKernel_d_2::AlgebraicReal_2`.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
\sa `AlgebraicKernel_d_2::BoundBetweenX_2`
|
||||
|
||||
|
|
@ -16,39 +16,39 @@ Computes a number of type
|
|||
class AlgebraicKernel_d_2::BoundBetweenY_2 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Bound result_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_1::Bound result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 first_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 first_argument_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 second_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 second_argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
Computes a number of type `AlgebraicKernel_d_1::Bound`
|
||||
in-between the second coordinates of \f$ a\f$ and \f$ b\f$.
|
||||
\pre \f$ a_y \neq b_y\f$.
|
||||
Computes a number of type `AlgebraicKernel_d_1::Bound`
|
||||
in-between the second coordinates of \f$ a\f$ and \f$ b\f$.
|
||||
\pre \f$ a_y \neq b_y\f$.
|
||||
|
||||
*/
|
||||
result_type
|
||||
operator()(const first_argument_type & a,
|
||||
const second_argument_type & b);
|
||||
*/
|
||||
result_type
|
||||
operator()(const first_argument_type & a,
|
||||
const second_argument_type & b);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Compares `AlgebraicKernel_d_2::Algebraic_real_2`s lexicographically.
|
||||
Compares `AlgebraicKernel_d_2::Algebraic_real_2`s lexicographically.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
\sa `AlgebraicKernel_d_2::CompareX_2`
|
||||
\sa `AlgebraicKernel_d_2::CompareY_2`
|
||||
|
|
@ -15,54 +15,54 @@ Compares `AlgebraicKernel_d_2::Algebraic_real_2`s lexicographically.
|
|||
class AlgebraicKernel_d_2::CompareXY_2 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Type convertible to `CGAL::Comparison_result`
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Type convertible to `CGAL::Comparison_result`
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 first_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 first_argument_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 second_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 second_argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Compares \f$ a\f$ and \f$ b\f$ lexicographically.
|
||||
*/
|
||||
result_type operator()(const first_argument_type & a, const second_argument_type & b);
|
||||
Compares \f$ a\f$ and \f$ b\f$ lexicographically.
|
||||
*/
|
||||
result_type operator()(const first_argument_type & a, const second_argument_type & b);
|
||||
|
||||
/*!
|
||||
Compares \f$ a\f$ with \f$ (x,y)\f$ lexicographically.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_2::Algebraic_real_2 a, int x, int y);
|
||||
Compares \f$ a\f$ with \f$ (x,y)\f$ lexicographically.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_2::Algebraic_real_2 a, int x, int y);
|
||||
|
||||
/*!
|
||||
Compares \f$ a\f$ with \f$ (x,y)\f$ lexicographically.
|
||||
*/
|
||||
result_type operator()(
|
||||
AlgebraicKernel_d_2::Algebraic_real_2 a,
|
||||
AlgebraicKernel_d_2::Bound x,
|
||||
AlgebraicKernel_d_2::Bound y);
|
||||
Compares \f$ a\f$ with \f$ (x,y)\f$ lexicographically.
|
||||
*/
|
||||
result_type operator()(
|
||||
AlgebraicKernel_d_2::Algebraic_real_2 a,
|
||||
AlgebraicKernel_d_2::Bound x,
|
||||
AlgebraicKernel_d_2::Bound y);
|
||||
|
||||
/*!
|
||||
Compares \f$ a\f$ with \f$ (x,y)\f$ lexicographically.
|
||||
*/
|
||||
result_type operator()(
|
||||
AlgebraicKernel_d_2::Algebraic_real_2 a,
|
||||
AlgebraicKernel_d_2::Coefficient x,
|
||||
AlgebraicKernel_d_2::Coefficient y);
|
||||
Compares \f$ a\f$ with \f$ (x,y)\f$ lexicographically.
|
||||
*/
|
||||
result_type operator()(
|
||||
AlgebraicKernel_d_2::Algebraic_real_2 a,
|
||||
AlgebraicKernel_d_2::Coefficient x,
|
||||
AlgebraicKernel_d_2::Coefficient y);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Compares the first coordinates of `AlgebraicKernel_d_2::Algebraic_real_2`s.
|
||||
Compares the first coordinates of `AlgebraicKernel_d_2::Algebraic_real_2`s.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
\sa `AlgebraicKernel_d_2::CompareY_2`
|
||||
\sa `AlgebraicKernel_d_2::CompareXY_2`
|
||||
|
|
@ -15,54 +15,54 @@ Compares the first coordinates of `AlgebraicKernel_d_2::Algebraic_real_2`s.
|
|||
class AlgebraicKernel_d_2::CompareX_2 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Type convertible to `CGAL::Comparison_result`
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Type convertible to `CGAL::Comparison_result`
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 first_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 first_argument_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 second_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 second_argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// The following operators and their symmetric counterparts are required:
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Compares the first coordinates of \f$ a\f$ and \f$ b\f$.
|
||||
*/
|
||||
result_type operator()(const first_argument_type & a, const second_argument_type & b);
|
||||
Compares the first coordinates of \f$ a\f$ and \f$ b\f$.
|
||||
*/
|
||||
result_type operator()(const first_argument_type & a, const second_argument_type & b);
|
||||
|
||||
/*!
|
||||
Compares the first coordinate of \f$ a\f$ with \f$ x\f$.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_2::Algebraic_real_2 a, int x);
|
||||
Compares the first coordinate of \f$ a\f$ with \f$ x\f$.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_2::Algebraic_real_2 a, int x);
|
||||
|
||||
/*!
|
||||
Compares the first coordinate of \f$ a\f$ with \f$ x\f$.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_2::Algebraic_real_2 a, AlgebraicKernel_d_2::Bound x);
|
||||
Compares the first coordinate of \f$ a\f$ with \f$ x\f$.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_2::Algebraic_real_2 a, AlgebraicKernel_d_2::Bound x);
|
||||
|
||||
/*!
|
||||
Compares the first coordinate of \f$ a\f$ with \f$ x\f$.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_2::Algebraic_real_2 a, AlgebraicKernel_d_2::Coefficient x);
|
||||
Compares the first coordinate of \f$ a\f$ with \f$ x\f$.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_2::Algebraic_real_2 a, AlgebraicKernel_d_2::Coefficient x);
|
||||
|
||||
/*!
|
||||
Compares the first coordinate of \f$ a\f$ with \f$ x\f$.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_2::Algebraic_real_2 a, AlgebraicKernel_d_2::Algebraic_real_1 x);
|
||||
Compares the first coordinate of \f$ a\f$ with \f$ x\f$.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_2::Algebraic_real_2 a, AlgebraicKernel_d_2::Algebraic_real_1 x);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Compares the second coordinated of `AlgebraicKernel_d_2::Algebraic_real_2`s.
|
||||
Compares the second coordinated of `AlgebraicKernel_d_2::Algebraic_real_2`s.
|
||||
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
\cgalRefines `AdaptableBinaryFunction`
|
||||
|
||||
\sa `AlgebraicKernel_d_2::CompareX_2`
|
||||
\sa `AlgebraicKernel_d_2::CompareXY_2`
|
||||
|
|
@ -15,54 +15,54 @@ Compares the second coordinated of `AlgebraicKernel_d_2::Algebraic_real_2`s.
|
|||
class AlgebraicKernel_d_2::CompareY_2 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Type convertible to `CGAL::Comparison_result`
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
Type convertible to `CGAL::Comparison_result`
|
||||
*/
|
||||
typedef unspecified_type result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 first_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 first_argument_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 second_argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 second_argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// The following operators and their symmetric counterparts are required:
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Compares the second coordinates of \f$ a\f$ and \f$ b\f$.
|
||||
*/
|
||||
result_type operator()(const first_argument_type & a, const second_argument_type & b);
|
||||
Compares the second coordinates of \f$ a\f$ and \f$ b\f$.
|
||||
*/
|
||||
result_type operator()(const first_argument_type & a, const second_argument_type & b);
|
||||
|
||||
/*!
|
||||
Compares the second coordinate of \f$ a\f$ with \f$ y\f$.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_2::Algebraic_real_2 a, int y);
|
||||
Compares the second coordinate of \f$ a\f$ with \f$ y\f$.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_2::Algebraic_real_2 a, int y);
|
||||
|
||||
/*!
|
||||
Compares the second coordinate of \f$ a\f$ with \f$ y\f$.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_2::Algebraic_real_2 a, AlgebraicKernel_d_2::Bound y);
|
||||
Compares the second coordinate of \f$ a\f$ with \f$ y\f$.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_2::Algebraic_real_2 a, AlgebraicKernel_d_2::Bound y);
|
||||
|
||||
/*!
|
||||
Compares the second coordinate of \f$ a\f$ with \f$ y\f$.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_2::Algebraic_real_2 a, AlgebraicKernel_d_2::Coefficient y);
|
||||
Compares the second coordinate of \f$ a\f$ with \f$ y\f$.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_2::Algebraic_real_2 a, AlgebraicKernel_d_2::Coefficient y);
|
||||
|
||||
/*!
|
||||
Compares the second coordinate of \f$ a\f$ with \f$ y\f$.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_2::Algebraic_real_2 a, AlgebraicKernel_d_2::Algebraic_real_1 y);
|
||||
Compares the second coordinate of \f$ a\f$ with \f$ y\f$.
|
||||
*/
|
||||
result_type operator()(AlgebraicKernel_d_2::Algebraic_real_2 a, AlgebraicKernel_d_2::Algebraic_real_1 y);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Computes a univariate square free polynomial \f$ p\f$, such that the first coordinate of
|
||||
a given `AlgebraicKernel_d_2::Algebraic_real_2` is a real root of \f$ p\f$.
|
||||
Computes a univariate square free polynomial \f$ p\f$, such that the first coordinate of
|
||||
a given `AlgebraicKernel_d_2::Algebraic_real_2` is a real root of \f$ p\f$.
|
||||
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
|
||||
\sa `AlgebraicKernel_d_2::ComputePolynomialY_2`
|
||||
|
||||
|
|
@ -15,29 +15,29 @@ a given `AlgebraicKernel_d_2::Algebraic_real_2` is a real root of \f$ p\f$.
|
|||
class AlgebraicKernel_d_2::ComputePolynomialX_2 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Polynomial_1 result_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Polynomial_1 result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Computes a univariate square free polynomial \f$ p\f$, such that the first
|
||||
coordinate of \f$ a\f$ is a real root of \f$ p\f$.
|
||||
*/
|
||||
result_type operator()(argument_type a);
|
||||
Computes a univariate square free polynomial \f$ p\f$, such that the first
|
||||
coordinate of \f$ a\f$ is a real root of \f$ p\f$.
|
||||
*/
|
||||
result_type operator()(argument_type a);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Computes a univariate square free polynomial \f$ p\f$, such that the second coordinate of
|
||||
a given `AlgebraicKernel_d_2::Algebraic_real_2` is a real root of \f$ p\f$.
|
||||
Computes a univariate square free polynomial \f$ p\f$, such that the second coordinate of
|
||||
a given `AlgebraicKernel_d_2::Algebraic_real_2` is a real root of \f$ p\f$.
|
||||
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
|
||||
\sa `AlgebraicKernel_d_2::ComputePolynomialX_2`
|
||||
|
||||
|
|
@ -15,29 +15,29 @@ a given `AlgebraicKernel_d_2::Algebraic_real_2` is a real root of \f$ p\f$.
|
|||
class AlgebraicKernel_d_2::ComputePolynomialY_2 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Polynomial_1 result_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Polynomial_1 result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
Computes a univariate square free polynomial \f$ p\f$, such that the second coordinate of \f$ a\f$
|
||||
is a real root of \f$ p\f$.
|
||||
*/
|
||||
result_type operator()(argument_type a);
|
||||
Computes a univariate square free polynomial \f$ p\f$, such that the second coordinate of \f$ a\f$
|
||||
is a real root of \f$ p\f$.
|
||||
*/
|
||||
result_type operator()(argument_type a);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Computes the first coordinate of an
|
||||
`AlgebraicKernel_d_2::AlgebraicReal_2`.
|
||||
Computes the first coordinate of an
|
||||
`AlgebraicKernel_d_2::AlgebraicReal_2`.
|
||||
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
|
||||
\sa `AlgebraicKernel_d_2::ComputeY_2`
|
||||
|
||||
|
|
@ -15,31 +15,31 @@ Computes the first coordinate of an
|
|||
class AlgebraicKernel_d_2::ComputeX_2 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_1 result_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_1 result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// A model of this type must provide:
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
Computes the first coordinate of \f$ a\f$.
|
||||
Computes the first coordinate of \f$ a\f$.
|
||||
|
||||
*/
|
||||
result_type operator()(const argument_type & a);
|
||||
*/
|
||||
result_type operator()(const argument_type & a);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Computes the second coordinate of an
|
||||
`AlgebraicKernel_d_2::AlgebraicReal_2`.
|
||||
Computes the second coordinate of an
|
||||
`AlgebraicKernel_d_2::AlgebraicReal_2`.
|
||||
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
\cgalRefines `AdaptableUnaryFunction`
|
||||
|
||||
\sa `AlgebraicKernel_d_2::ComputeY_2`
|
||||
|
||||
|
|
@ -15,31 +15,31 @@ Computes the second coordinate of an
|
|||
class AlgebraicKernel_d_2::ComputeY_2 {
|
||||
public:
|
||||
|
||||
/// \name Types
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_1 result_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_1 result_type;
|
||||
|
||||
/*!
|
||||
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 argument_type;
|
||||
*/
|
||||
typedef AlgebraicKernel_d_2::Algebraic_real_2 argument_type;
|
||||
|
||||
/// @}
|
||||
/// @}
|
||||
|
||||
/// \name Operations
|
||||
/// \name Operations
|
||||
/// A model of this type must provide:
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
|
||||
Computes the second coordinate of \f$ a\f$.
|
||||
Computes the second coordinate of \f$ a\f$.
|
||||
|
||||
*/
|
||||
result_type operator()(const argument_type & a);
|
||||
*/
|
||||
result_type operator()(const argument_type & a);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue