|
DGtal 2.0.0
|
#include <cstdio>#include <cmath>#include <iostream>#include "DGtal/base/Common.h"#include "DGtal/base/CountedPtr.h"#include "DGtal/base/CountedPtrOrPtr.h"#include "DGtal/base/CountedConstPtrOrConstPtr.h"#include "DGtal/base/CowPtr.h"#include "DGtal/base/Clone.h"#include "DGtal/base/Alias.h"#include "DGtal/base/ConstAlias.h"#include "DGtal/helpers/StdDefs.h"Go to the source code of this file.
Data Structures | |
| class | DGtal::NClone< T > |
| struct | DummyTbl |
| struct | CloneToValueMember |
| struct | CloneToCountedMember |
| struct | CloneToCowMember |
| struct | CloneToPtrMember |
| struct | AliasToRefMember |
| struct | AliasToPtrMember |
| struct | AliasToCountedPtrOrPtrMember |
| struct | AliasToConstRefMember |
| struct | ConstAliasToConstRefMember |
| struct | ConstAliasToConstPtrMember |
| struct | ConstAliasToCountedConstPtrOrConstPtrMember |
| class | MyPoint |
| class | MyPointD |
| struct | TriangleByConstReference |
| struct | TriangleByValue |
| struct | TriangleByClone |
| struct | TriangleByCloneAndCow |
Namespaces | |
| namespace | DGtal |
DGtal is the top-level namespace which contains all DGtal functions and types. | |
Typedefs | |
| typedef MyPointD | Point |
Functions | |
| template<typename Triangle> | |
| double | computeTriangles (int size) |
| template<typename Triangle> | |
| double | computeTrianglesByCowPtr (int size) |
| bool | testAliasCases () |
| bool | testConstAliasCases () |
| bool | testCloneCases () |
| bool | testCloneTimings () |
| int | main () |
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
This file is part of the DGtal library
Definition in file testClone2.cpp.
Definition at line 381 of file testClone2.cpp.
| double computeTriangles | ( | int | size | ) |
Definition at line 426 of file testClone2.cpp.
Referenced by testCloneTimings().
| double computeTrianglesByCowPtr | ( | int | size | ) |
Definition at line 447 of file testClone2.cpp.
Referenced by testCloneTimings().
| int main | ( | void | ) |
Definition at line 945 of file testClone2.cpp.
References testAliasCases(), testCloneCases(), testCloneTimings(), and testConstAliasCases().
| bool testAliasCases | ( | ) |
Alias: Performs without unnecessary duplicates "parameter -> member data"
Definition at line 475 of file testClone2.cpp.
References AliasToCountedPtrOrPtrMember::myDummyTbl, DummyTbl::nbCreated, DummyTbl::nbDeleted, DummyTbl::reset(), DGtal::trace, AliasToCountedPtrOrPtrMember::value(), AliasToPtrMember::value(), and AliasToRefMember::value().
Referenced by main().
| bool testCloneCases | ( | ) |
Clone: Performs without unnecessary duplicates "parameter -> member data"
Definition at line 691 of file testClone2.cpp.
References DummyTbl::nbCreated, DummyTbl::nbDeleted, DummyTbl::nbMoved, DummyTbl::reset(), CloneToCowMember::setValue(), DGtal::trace, CloneToCountedMember::value(), CloneToCowMember::value(), CloneToPtrMember::value(), and CloneToValueMember::value().
Referenced by main().
| bool testCloneTimings | ( | ) |
Definition at line 882 of file testClone2.cpp.
References computeTriangles(), computeTrianglesByCowPtr(), MyPointD::nbCreated, MyPointD::nbDeleted, MyPointD::reset(), and DGtal::trace.
Referenced by main().
| bool testConstAliasCases | ( | ) |
ConstAlias: Performs without unnecessary duplicates "parameter -> member data"
Definition at line 574 of file testClone2.cpp.
References DummyTbl::nbCreated, DummyTbl::nbDeleted, DummyTbl::reset(), DGtal::trace, ConstAliasToConstPtrMember::value(), ConstAliasToConstRefMember::value(), and ConstAliasToCountedConstPtrOrConstPtrMember::value().
Referenced by main().