CppAD: A C++ Algorithmic Differentiation Package  20130102
sparse_pattern.hpp
Go to the documentation of this file.
00001 /* $Id$ */
00002 # ifndef CPPAD_SPARSE_PATTERN_INCLUDED
00003 # define CPPAD_SPARSE_PATTERN_INCLUDED
00004 
00005 /* --------------------------------------------------------------------------
00006 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-12 Bradley M. Bell
00007 
00008 CppAD is distributed under multiple licenses. This distribution is under
00009 the terms of the 
00010                     Eclipse Public License Version 1.0.
00011 
00012 A copy of this license is included in the COPYING file of this distribution.
00013 Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
00014 -------------------------------------------------------------------------- */
00015 
00016 // necessary definitions
00017 # include <cppad/local/define.hpp>
00018 # include <cppad/local/sparse_pack.hpp>
00019 # include <cppad/local/sparse_set.hpp>
00020 # include <cppad/local/sparse_list.hpp>
00021 
00022 CPPAD_BEGIN_NAMESPACE
00023 /*!
00024 \defgroup sparse_pattern_hpp sparse_pattern.hpp
00025 \{
00026 \file sparse_pattern.hpp
00027 Determine internal spasity pattern from correpsonding element type.
00028 */
00029 
00030 /*!
00031 Template structure used obtain the internal sparsity pattern type
00032 form the corresponding element type.
00033 The general form is not valid, must use a specialization.
00034 
00035 \tparam Element_type
00036 type of an element in the sparsity structrue.
00037 
00038 \par <code>internal_sparsity<Element_type>::pattern_type</code>
00039 is the type of the corresponding internal sparsity pattern.
00040 */
00041 template <class Element_type> struct internal_sparsity;
00042 /*!
00043 Specilization for \c bool elements.
00044 */
00045 template <> 
00046 struct internal_sparsity<bool> 
00047 {
00048      typedef sparse_pack pattern_type;
00049 };
00050 /*!
00051 Specilization for <code>std::set<size_t></code> elements.
00052 */
00053 template <> 
00054 struct internal_sparsity< std::set<size_t> > 
00055 {
00056      typedef CPPAD_INTERNAL_SPARSE_SET pattern_type;
00057 }; 
00058 
00059 /*! \} */
00060 CPPAD_END_NAMESPACE
00061 
00062 # endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines