#ifndef _OTB_TRISKELE_TREE_TPP #define _OTB_TRISKELE_TREE_TPP template void Tree::forEachLeaf (const FuncToApply &f /* f (DimNodeId leafId) */) const { for (DimNodeId leafId = 0; leafId < leafCount; ++leafId) f (leafId); } template void Tree::forEachComp (const FuncToApply &f /* f (DimNodeId compId) */) const { DimNodeId compCount = nodeCount - leafCount; for (DimNodeId compId = 0; compId < compCount; ++compId) f (compId); } template void Tree::forEachChild (const DimNodeId &parentId, const FuncToApply &f /* f (DimNodeId childId) */) const { DimNodeId minChild = childCount[parentId], maxChild = childCount[parentId+1]; for (DimNodeId childId = minChild; childId < maxChild; ++childId) f (children[childId]); } #endif // _OTB_TRISKELE_TREE_TPP