[an error occurred while processing this directive]
Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

celeste/Utilities.h

Go to the documentation of this file.
00001 /* Import from Gabor API
00002 
00003 Copyright (c) 2002-3 Adriaan Tijsseling
00004 
00005 
00006                              All Rights Reserved
00007 
00008     This program is free software; you can redistribute it and/or modify
00009     it under the terms of the GNU General Public License as published by
00010     the Free Software Foundation; either version 2 of the License, or
00011     (at your option) any later version.
00012 
00013     This program is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016     GNU General Public License for more details.
00017 
00018     You should have received a copy of the GNU General Public License
00019     along with this program. If not, see <http://www.gnu.org/licenses/>.
00020 */
00021 
00022 /*
00023         Author:                 Adriaan Tijsseling (AGT)
00024         Copyright:              (c) Copyright 2002-3 Adriaan Tijsseling. All rights reserved.
00025         Description:    Probably useful...
00026 */
00027 
00028 #ifndef __UTILITIES__
00029 #define __UTILITIES__
00030 
00031 #include <hugin_shared.h>
00032 #include <fstream>
00033 #include <iostream>
00034 #include <stdio.h>
00035 #ifdef _WINDOWS
00036 #include "direct.h"
00037 #endif
00038 
00039 using namespace std; 
00040 
00041 enum
00042 {
00043         kLeft = 0,
00044         kRight
00045 };
00046 
00047 IMPEX void              Permute( int* array, size_t size );
00048 IMPEX int                       cmp(const void *s1, const void *s2);    // for qsort() function
00049 
00050 IMPEX float             Heavyside( float a );
00051 
00052 IMPEX float             Sigmoid( float act );
00053 IMPEX float             Sigmoid( float beta, float a_pot );
00054 IMPEX float             Sigmoid( float beta, float a_pot, float thresh );
00055 
00056 IMPEX int                       **CreateMatrix( int val, int row, int col );
00057 IMPEX void              ResetMatrix( int ** matrix, int val, int row, int col );
00058 IMPEX void              DisposeMatrix( int** matrix, int row );
00059 
00060 IMPEX float             **CreateMatrix( float val, int row, int col );
00061 IMPEX void              ResetMatrix( float ** matrix, float val, int row, int col );
00062 IMPEX void              DisposeMatrix( float** matrix, int row );
00063 
00064 IMPEX float             ReturnDistance( float *pat1, float *pat2, int size );
00065 
00066 IMPEX void              GetStreamDefaults( void );
00067 IMPEX void              AdjustStream( ostream &os, int precision, int width, int pos, bool trailers );
00068 IMPEX void              SetStreamDefaults( ostream &os );
00069 
00070 IMPEX void              SkipComments( ifstream* infile );
00071 IMPEX void              FileCreateError( char* filename );
00072 IMPEX void              FileOpenError( char* filename );
00073 
00074 IMPEX double            SafeAbs( double val1, double val2 );
00075 IMPEX float             SafeAbs( float val1, float val2 );
00076 IMPEX int                       SafeAbs( int val1, int val2 );
00077 IMPEX double            SafeAbs( double val );
00078 IMPEX float             SafeAbs( float val );
00079 IMPEX int                       SafeAbs( int val );
00080 
00081 #endif
00082 

Generated on Mon Sep 20 01:01:25 2010 for Hugintrunk by doxygen 1.3.9.1