00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _GLOBAL_HXX_
00029 #define _GLOBAL_HXX_
00030
00031 #include <string>
00032 #include <iterator>
00033 #include <iostream>
00034 #include <vector>
00035
00036 #define SCSOLVER_DEBUG 0
00037
00038 #define REWRITE_FOR_SUN_STUDIO_COMPILER 1
00039
00040 #if defined(SCSOLVER_UNO_COMPONENT) || defined(SCSOLVER_UNITTEST)
00041
00042 #ifndef OSL_ASSERT
00043 #define OSL_ASSERT assert
00044 #endif
00045
00046 #else
00047 #include <osl/diagnose.h>
00048 #endif
00049
00050 namespace scsolver { namespace numeric {
00051 class Matrix;
00052 }}
00053
00054 namespace {
00055
00056
00057
00058
00059 template<typename Container>
00060 void printElements( const Container& cn, const char* sep = " " )
00061 {
00062 using namespace ::std;
00063 copy( cn.begin(), cn.end(), ostream_iterator<typename Container::value_type>( cout, sep ) );
00064 cout << endl;
00065 }
00066
00067 }
00068
00069 namespace scsolver {
00070
00076 void Debug( const char* s );
00077 std::string repeatString( const char*, unsigned long );
00078
00079 void vectorToMatrix(const ::std::vector<double>& vec, ::scsolver::numeric::Matrix& mx, bool rowMatrix = true);
00080 void matrixToVector(const ::scsolver::numeric::Matrix& mx, ::std::vector<double>& vec);
00081
00082 }
00083
00084 #endif