00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkSortDataArray.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 00016 /* 00017 * Copyright 2003 Sandia Corporation. 00018 * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00019 * license for use of this work by or on behalf of the 00020 * U.S. Government. Redistribution and use in source and binary forms, with 00021 * or without modification, are permitted provided that this Notice and any 00022 * statement of authorship are reproduced on all copies. 00023 */ 00024 00029 #ifndef __vtkSortDataArray_h 00030 #define __vtkSortDataArray_h 00031 00032 #include "vtkObject.h" 00033 00034 class vtkIdList; 00035 class vtkAbstractArray; 00036 00037 class VTK_GRAPHICS_EXPORT vtkSortDataArray : public vtkObject 00038 { 00039 public: 00040 vtkTypeMacro(vtkSortDataArray, vtkObject); 00041 static vtkSortDataArray *New(); 00042 virtual void PrintSelf(ostream &os, vtkIndent indent); 00043 00045 00046 static void Sort(vtkIdList *keys); 00047 static void Sort(vtkAbstractArray *keys); 00049 00056 static void SortArrayByComponent( vtkAbstractArray* arr, int k ); 00057 00059 00062 static void Sort(vtkIdList *keys, vtkIdList *values); 00063 static void Sort(vtkIdList *keys, vtkAbstractArray *values); 00064 static void Sort(vtkAbstractArray *keys, vtkIdList *values); 00065 static void Sort(vtkAbstractArray *keys, vtkAbstractArray *values); 00067 00068 protected: 00069 vtkSortDataArray(); 00070 virtual ~vtkSortDataArray(); 00071 00072 private: 00073 vtkSortDataArray(const vtkSortDataArray &); // Not implemented. 00074 void operator=(const vtkSortDataArray &); // Not implemented. 00075 }; 00076 00077 #endif //__vtkSortDataArray_h