mirror of https://github.com/CGAL/cgal
added source set functions
This commit is contained in:
parent
aba4792ce7
commit
b58b22e7cc
|
|
@ -17,7 +17,7 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0+
|
// SPDX-License-Identifier: GPL-3.0+
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Christina Cruz, Keenan Crane, Andreas Fabri
|
// Author(s) : Christina Vaz, Keenan Crane, Andreas Fabri
|
||||||
|
|
||||||
#ifndef CGAL_HEAT_METHOD_3_HEAT_METHOD_3_H
|
#ifndef CGAL_HEAT_METHOD_3_HEAT_METHOD_3_H
|
||||||
#define CGAL_HEAT_METHOD_3_HEAT_METHOD_3_H
|
#define CGAL_HEAT_METHOD_3_HEAT_METHOD_3_H
|
||||||
|
|
@ -93,6 +93,43 @@ namespace Heat_method_3 {
|
||||||
return sources.insert(vd).second;
|
return sources.insert(vd).second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*remove 'vd' from the source set, returning 'true' if 'vd' was in the set
|
||||||
|
*/
|
||||||
|
bool remove_source(vertex_descriptor vd)
|
||||||
|
{
|
||||||
|
if(sources.find(vd))
|
||||||
|
{
|
||||||
|
sources.erase(vd);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
vertex_descriptor getSources()
|
||||||
|
{
|
||||||
|
return sources;
|
||||||
|
}
|
||||||
|
|
||||||
|
void clearSources()
|
||||||
|
{
|
||||||
|
sources.clear();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
vertex_descriptor sourcesBegin()
|
||||||
|
{
|
||||||
|
return sources.begin();
|
||||||
|
}
|
||||||
|
|
||||||
|
vertex_descriptor sourcesEnd()
|
||||||
|
{
|
||||||
|
return sources.end();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get distance from the current source set to a vertex ` vd`.
|
* get distance from the current source set to a vertex ` vd`.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue