pinocchio  2.3.1-dirty
c-crtp.md
1 # Curiously recurring template pattern
2 <!--
3 // Copyright (c) 2016 CNRS
4 // Author: Florent Lamiraux, Justin Carpentier, Florian Valenza
5 //
6 // This file is part of Pinocchio
7 // Pinocchio is free software: you can redistribute it
8 // and/or modify it under the terms of the GNU Lesser General Public
9 // License as published by the Free Software Foundation, either version
10 // 3 of the License, or (at your option) any later version.
11 //
12 // Pinocchio is distributed in the hope that it will be
13 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
14 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // General Lesser Public License for more details. You should have
16 // received a copy of the GNU Lesser General Public License along with
17 // Pinocchio If not, see
18 // <http://www.gnu.org/licenses/>.
19 -->
20 
21 Similarly to Eigen, Pinocchio library makes intensive use of the so called CRTP design
22 pattern. This pattern is used for performance reasons in the
23 implementation of static polymorphism, avoiding dynamic casts and calls to virtual methods.
24 All in all, CRTP plays a central role in the performance of Pinocchio.
25 
26 We refer to https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern for further explanations.