MFEM v2.0
|
00001 // Copyright (c) 2010, Lawrence Livermore National Security, LLC. Produced at 00002 // the Lawrence Livermore National Laboratory. LLNL-CODE-443211. All Rights 00003 // reserved. See file COPYRIGHT for details. 00004 // 00005 // This file is part of the MFEM library. For more information and source code 00006 // availability see http://mfem.googlecode.com. 00007 // 00008 // MFEM is free software; you can redistribute it and/or modify it under the 00009 // terms of the GNU Lesser General Public License (as published by the Free 00010 // Software Foundation) version 2.1 dated February 1999. 00011 00012 #ifndef MFEM_SORT_PAIRS 00013 #define MFEM_SORT_PAIRS 00014 00016 template <class A, class B> 00017 class Pair 00018 { 00019 public: 00020 A one; 00021 B two; 00022 }; 00023 00025 template <class A, class B> 00026 int ComparePairs (const void *_p, const void *_q); 00027 00029 template <class A, class B> 00030 void SortPairs (Pair<A, B> *pairs, int size); 00031 00032 #endif