| 1 |
rtomiyasu |
3 |
/* |
| 2 |
|
|
* The MIT License |
| 3 |
|
|
|
| 4 |
|
|
Conograph (powder auto-indexing program) |
| 5 |
|
|
|
| 6 |
|
|
Copyright (c) <2012> <Ryoko Oishi-Tomiyasu, KEK> |
| 7 |
|
|
|
| 8 |
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy |
| 9 |
|
|
of this software and associated documentation files (the "Software"), to deal |
| 10 |
|
|
in the Software without restriction, including without limitation the rights |
| 11 |
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 12 |
|
|
copies of the Software, and to permit persons to whom the Software is |
| 13 |
|
|
furnished to do so, subject to the following conditions: |
| 14 |
|
|
|
| 15 |
|
|
The above copyright notice and this permission notice shall be included in |
| 16 |
|
|
all copies or substantial portions of the Software. |
| 17 |
|
|
|
| 18 |
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 19 |
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 20 |
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 21 |
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 22 |
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 23 |
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 24 |
|
|
THE SOFTWARE. |
| 25 |
|
|
* |
| 26 |
|
|
*/ |
| 27 |
|
|
#ifndef COMMON_HH_ |
| 28 |
|
|
#define COMMON_HH_ |
| 29 |
|
|
|
| 30 |
|
|
#if defined(__cplusplus) |
| 31 |
|
|
|
| 32 |
|
|
#include<vector> |
| 33 |
|
|
#include<complex> |
| 34 |
|
|
|
| 35 |
|
|
using namespace std; |
| 36 |
|
|
#endif |
| 37 |
|
|
|
| 38 |
|
|
typedef char Char; |
| 39 |
|
|
typedef unsigned char UChar; |
| 40 |
|
|
typedef short Int2; |
| 41 |
|
|
typedef unsigned short UInt2; |
| 42 |
|
|
typedef int Int4; |
| 43 |
|
|
typedef unsigned int UInt4; |
| 44 |
|
|
typedef long long Int8; |
| 45 |
|
|
//typedef unsigned long long UInt8; //Mac OS X define UInt8 (typedef unsigned char) |
| 46 |
|
|
typedef double Double; |
| 47 |
|
|
typedef float Float; |
| 48 |
|
|
|
| 49 |
|
|
#ifdef __x86_64__ |
| 50 |
|
|
typedef Int8 ArrayIndex; |
| 51 |
|
|
#else |
| 52 |
|
|
typedef Int4 ArrayIndex; |
| 53 |
|
|
#endif |
| 54 |
|
|
|
| 55 |
|
|
typedef enum _ConographAnalysisMode { |
| 56 |
|
|
ConographQuickSearch = 0, |
| 57 |
|
|
ConographRegularSearch = 1 |
| 58 |
|
|
} eConographAnalysisMode; |
| 59 |
|
|
|
| 60 |
|
|
typedef enum { |
| 61 |
|
|
kZRietveldTemperatureFactorUnitB = 0, |
| 62 |
|
|
kZRietveldTemperatureFactorUnitU = 1, |
| 63 |
|
|
kZRietveldTemperatureFactorUnitUndefined = 2 |
| 64 |
|
|
}ZRietveldTemperatureFactorUnit; |
| 65 |
|
|
|
| 66 |
|
|
#if defined(__cplusplus) |
| 67 |
|
|
extern "C" { |
| 68 |
|
|
#endif |
| 69 |
|
|
|
| 70 |
|
|
/*! @enum ZRietveldBeamType |
| 71 |
|
|
FitDataParam.hh m_Beam_Type |
| 72 |
|
|
*/ |
| 73 |
|
|
typedef enum _ZRietveldBeamType |
| 74 |
|
|
{ |
| 75 |
|
|
kZRietveldBeamTypeNeutron = 0, //!< Neutron Beam |
| 76 |
|
|
kZRietveldBeamTypeXRay = 1 //!< X-ray |
| 77 |
|
|
}ZRietveldBeamType; |
| 78 |
|
|
|
| 79 |
|
|
/*! @enum ZRietveldMesurementMethod |
| 80 |
|
|
FitDataParam.hh m_TOForAD |
| 81 |
|
|
*/ |
| 82 |
|
|
typedef enum _ZRietveldMesurementMethod { |
| 83 |
|
|
kZRietveldMeasurementMethodTimeOfFlight = 0, //!< TOF (Time Of Flight) |
| 84 |
|
|
kZRietveldMeasurementMethodReactor = 1, //!< Reactor (Neutron) |
| 85 |
|
|
kZRietveldBraggBrentanoGeometryConventionalDivergenceSlit = 2,//!< Bragg-Brentano geometry (conventional divergence slit) |
| 86 |
|
|
kZRietveldBraggBrentanoGeometryAutomaticDivergenceSlit = 3 //!<Bragg-Brentano geometry (automatic divergence slit*) |
| 87 |
|
|
}ZRietveldMesurementMethod; |
| 88 |
|
|
|
| 89 |
|
|
/*! @enum ZRietveldHistogramFileFormat |
| 90 |
|
|
*/ |
| 91 |
|
|
typedef enum _ZRietveldHistogramFileFormat { |
| 92 |
|
|
kZRietveldHistogramFileFormatGeneral = 0, //!< General Format |
| 93 |
|
|
kZRietveldHistogramFileFormatIGOR = 1, //!< IGOR Format |
| 94 |
|
|
kZRietveldHistogramFileFormatRietan = 2 //!< Rietan Format |
| 95 |
|
|
}ZRietveldHistogramFileFormat; |
| 96 |
|
|
|
| 97 |
|
|
#if defined(__cplusplus) |
| 98 |
|
|
} |
| 99 |
|
|
#endif |
| 100 |
|
|
|
| 101 |
|
|
|
| 102 |
|
|
#if defined(__cplusplus) |
| 103 |
|
|
|
| 104 |
|
|
typedef vector<double> Vec_DP; |
| 105 |
|
|
typedef vector<int> Vec_INT; |
| 106 |
|
|
typedef vector<char> Vec_CHAR; |
| 107 |
|
|
typedef vector<bool> Vec_BOOL; |
| 108 |
|
|
//typedef vector< vector<int> > Mat_INT_iconstr; |
| 109 |
|
|
typedef vector< vector<double> > Mat_DP_iconstr; |
| 110 |
|
|
|
| 111 |
|
|
typedef complex<double> CMPX_DP; |
| 112 |
|
|
|
| 113 |
|
|
typedef vector< vector<double> > each_Vec_DP; |
| 114 |
|
|
typedef vector< vector<Int4> > each_Vec_INT; |
| 115 |
|
|
|
| 116 |
|
|
typedef struct{ |
| 117 |
|
|
Double Rwp; |
| 118 |
|
|
Double Rp; |
| 119 |
|
|
Double Re; |
| 120 |
|
|
Double DW; |
| 121 |
|
|
Vec_DP RB; |
| 122 |
|
|
Vec_DP RF; |
| 123 |
|
|
} statistics_data; |
| 124 |
|
|
#endif |
| 125 |
|
|
|
| 126 |
|
|
#endif /*COMMON_HH_*/ |