Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
b78b2bb6
Commit
b78b2bb6
authored
May 12, 2011
by
Peterson, Peter
Browse files
Refs #3008.
parent
1d604843
Changes
192
Hide whitespace changes
Inline
Side-by-side
Code/Mantid/Framework/API/inc/MantidAPI/Algorithm.h
View file @
b78b2bb6
...
...
@@ -331,7 +331,7 @@ private:
Algorithm
&
operator
=
(
const
Algorithm
&
);
void
store
();
void
fillHistory
(
Mantid
::
Kernel
::
DateAndTime
,
double
,
unsigned
in
t
);
void
fillHistory
(
Mantid
::
Kernel
::
DateAndTime
,
double
,
std
::
size_
t
);
void
findWorkspaceProperties
(
std
::
vector
<
Workspace_sptr
>&
inputWorkspaces
,
std
::
vector
<
Workspace_sptr
>&
outputWorkspaces
)
const
;
void
algorithm_info
()
const
;
...
...
Code/Mantid/Framework/API/inc/MantidAPI/AlgorithmHistory.h
View file @
b78b2bb6
...
...
@@ -49,7 +49,7 @@ public:
explicit
AlgorithmHistory
(
const
Algorithm
*
const
alg
,
const
Mantid
::
Kernel
::
DateAndTime
&
start
=
Mantid
::
Kernel
::
DateAndTime
::
defaultTime
(),
const
double
&
duration
=
-
1
,
unsigned
in
t
uexeccount
=
0
);
const
double
&
duration
=
-
1
,
std
::
size_
t
uexeccount
=
0
);
virtual
~
AlgorithmHistory
();
AlgorithmHistory
&
operator
=
(
const
AlgorithmHistory
&
);
AlgorithmHistory
(
const
AlgorithmHistory
&
);
...
...
@@ -69,7 +69,7 @@ public:
/// get execution date
Mantid
::
Kernel
::
DateAndTime
executionDate
()
const
{
return
m_executionDate
;}
///get the execution count
const
in
t
&
execCount
()
const
{
return
m_execCount
;}
const
std
::
size_
t
&
execCount
()
const
{
return
m_execCount
;}
/// get parameter list of algorithm in history const
const
std
::
vector
<
Kernel
::
PropertyHistory
>&
getProperties
()
const
{
return
m_properties
;}
/// print contents of object
...
...
@@ -96,7 +96,7 @@ private:
/// The PropertyHistory's defined for the algorithm
std
::
vector
<
Kernel
::
PropertyHistory
>
m_properties
;
///count keeps track of execution order of an algorithm
in
t
m_execCount
;
std
::
size_
t
m_execCount
;
};
DLLExport
std
::
ostream
&
operator
<<
(
std
::
ostream
&
,
const
AlgorithmHistory
&
);
...
...
Code/Mantid/Framework/API/inc/MantidAPI/Axis.h
View file @
b78b2bb6
...
...
@@ -73,22 +73,22 @@ public:
/// Returns the value at a specified index
/// @param index :: the index
/// @param verticalIndex :: The verticalIndex
virtual
double
operator
()(
const
in
t
&
index
,
const
in
t
&
verticalIndex
=
0
)
const
=
0
;
virtual
double
operator
()(
const
std
::
size_
t
&
index
,
const
std
::
size_
t
&
verticalIndex
=
0
)
const
=
0
;
/// Sets the value at the specified index
/// @param index :: The index
/// @param value :: The new value
virtual
void
setValue
(
const
in
t
&
index
,
const
double
&
value
)
=
0
;
virtual
const
int
&
spectraNo
(
const
in
t
&
index
)
const
;
virtual
int
&
spectraNo
(
const
in
t
&
index
);
virtual
void
setValue
(
const
std
::
size_
t
&
index
,
const
double
&
value
)
=
0
;
virtual
const
int
64_t
&
spectraNo
(
const
std
::
size_
t
&
index
)
const
;
virtual
int
64_t
&
spectraNo
(
const
std
::
size_
t
&
index
);
/// Get the length of the axis
virtual
in
t
length
()
const
=
0
;
virtual
std
::
size_
t
length
()
const
=
0
;
/// Check whether two axis are the same, i.e same length and same spectra_values for all elements in the axis
virtual
bool
operator
==
(
const
Axis
&
)
const
=
0
;
/// Returns a text label of for a value
virtual
std
::
string
label
(
const
in
t
&
index
)
const
=
0
;
virtual
std
::
string
label
(
const
std
::
size_
t
&
index
)
const
=
0
;
protected:
Axis
(
const
Axis
&
right
);
...
...
Code/Mantid/Framework/API/inc/MantidAPI/CompositeFunction.h
View file @
b78b2bb6
...
...
@@ -4,6 +4,7 @@
//----------------------------------------------------------------------
// Includes
//----------------------------------------------------------------------
#include
"MantidKernel/System.h"
#include
"MantidAPI/IFitFunction.h"
#include
<boost/shared_array.hpp>
...
...
@@ -55,26 +56,26 @@ public:
std
::
string
asString
()
const
;
/// Set i-th parameter
void
setParameter
(
in
t
,
const
double
&
value
,
bool
explicitlySet
=
true
);
void
setParameter
(
size_
t
,
const
double
&
value
,
bool
explicitlySet
=
true
);
/// Get i-th parameter
double
getParameter
(
in
t
i
)
const
;
double
getParameter
(
size_
t
i
)
const
;
/// Set parameter by name.
void
setParameter
(
const
std
::
string
&
name
,
const
double
&
value
,
bool
explicitlySet
=
true
);
/// Get parameter by name.
double
getParameter
(
const
std
::
string
&
name
)
const
;
/// Total number of parameters
in
t
nParams
()
const
;
std
::
size_
t
nParams
()
const
;
/// Returns the index of parameter name
in
t
parameterIndex
(
const
std
::
string
&
name
)
const
;
std
::
size_
t
parameterIndex
(
const
std
::
string
&
name
)
const
;
/// Returns the index of a parameter
//int parameterIndex(const double* p)const;
/// Returns the name of parameter i
std
::
string
parameterName
(
in
t
i
)
const
;
std
::
string
parameterName
(
std
::
size_
t
i
)
const
;
/// Checks if a parameter has been set explicitly
bool
isExplicitlySet
(
in
t
i
)
const
;
bool
isExplicitlySet
(
std
::
size_
t
i
)
const
;
/// Number of active (in terms of fitting) parameters
in
t
nActive
()
const
;
std
::
size_
t
nActive
()
const
;
/// Value of i-th active parameter. Override this method to make fitted parameters different from the declared
double
activeParameter
(
int
i
)
const
;
/// Set new value of i-th active parameter. Override this method to make fitted parameters different from the declared
...
...
@@ -82,21 +83,21 @@ public:
/// Update parameters after a fitting iteration
void
updateActive
(
const
double
*
in
);
/// Returns "global" index of active parameter i
in
t
indexOfActive
(
in
t
i
)
const
;
std
::
size_
t
indexOfActive
(
std
::
size_
t
i
)
const
;
/// Returns the name of active parameter i
std
::
string
nameOfActive
(
in
t
i
)
const
;
std
::
string
nameOfActive
(
std
::
size_
t
i
)
const
;
/// Check if a parameter is active
bool
isActive
(
in
t
i
)
const
;
bool
isActive
(
std
::
size_
t
i
)
const
;
/// Get active index for a declared parameter i
int
activeIndex
(
in
t
i
)
const
;
int
64_t
activeIndex
(
std
::
size_
t
i
)
const
;
/// Removes a parameter from the list of active
void
removeActive
(
in
t
i
);
void
removeActive
(
std
::
size_
t
i
);
/// Restores a declared parameter i to the active status
void
restoreActive
(
in
t
i
);
void
restoreActive
(
std
::
size_
t
i
);
/// Return parameter index from a parameter reference.
int
getParameterIndex
(
const
ParameterReference
&
ref
)
const
;
int
64_t
getParameterIndex
(
const
ParameterReference
&
ref
)
const
;
/// Get the containing function
IFitFunction
*
getContainingFunction
(
const
ParameterReference
&
ref
)
const
;
/// Get the containing function
...
...
@@ -107,14 +108,14 @@ public:
/// Remove all ties
void
clearTies
();
/// Removes i-th parameter's tie
bool
removeTie
(
in
t
i
);
bool
removeTie
(
std
::
size_
t
i
);
/// Get the tie of i-th parameter
ParameterTie
*
getTie
(
in
t
i
)
const
;
ParameterTie
*
getTie
(
std
::
size_
t
i
)
const
;
/// Overwrite IFitFunction methods
void
addConstraint
(
IConstraint
*
ic
);
/// Get constraint of i-th parameter
virtual
IConstraint
*
getConstraint
(
in
t
i
)
const
;
virtual
IConstraint
*
getConstraint
(
std
::
size_
t
i
)
const
;
void
setParametersToSatisfyConstraints
();
/// Remove a constraint
void
removeConstraint
(
const
std
::
string
&
parName
);
...
...
@@ -123,25 +124,25 @@ public:
/* CompositeFunction own methods */
/// Add a function at the back of the internal function list
virtual
in
t
addFunction
(
IFitFunction
*
f
);
virtual
std
::
size_
t
addFunction
(
IFitFunction
*
f
);
/// Returns the pointer to i-th function
IFitFunction
*
getFunction
(
in
t
i
)
const
;
IFitFunction
*
getFunction
(
std
::
size_
t
i
)
const
;
/// Number of functions
in
t
nFunctions
()
const
{
return
static_cast
<
int
>
(
m_functions
.
size
()
)
;}
std
::
size_
t
nFunctions
()
const
{
return
m_functions
.
size
();}
/// Remove a function
void
removeFunction
(
in
t
i
,
bool
del
=
true
);
void
removeFunction
(
std
::
size_
t
i
,
bool
del
=
true
);
/// Replace a function
void
replaceFunction
(
in
t
i
,
IFitFunction
*
f
);
void
replaceFunction
(
std
::
size_
t
i
,
IFitFunction
*
f
);
/// Replace a function
void
replaceFunction
(
const
IFitFunction
*
f_old
,
IFitFunction
*
f_new
);
/// Get the function index
in
t
functionIndex
(
in
t
i
)
const
;
std
::
size_
t
functionIndex
(
std
::
size_
t
i
)
const
;
/// Get the function index
in
t
functionIndexActive
(
in
t
i
)
const
;
std
::
size_
t
functionIndexActive
(
std
::
size_
t
i
)
const
;
/// Returns the index of parameter i as it declared in its function
in
t
parameterLocalIndex
(
in
t
i
)
const
;
std
::
size_
t
parameterLocalIndex
(
std
::
size_
t
i
)
const
;
/// Returns the name of parameter i as it declared in its function
std
::
string
parameterLocalName
(
in
t
i
)
const
;
std
::
string
parameterLocalName
(
std
::
size_
t
i
)
const
;
/// Check the function.
void
checkFunction
();
...
...
@@ -153,32 +154,32 @@ protected:
/// Add a new tie
virtual
void
addTie
(
ParameterTie
*
tie
);
in
t
paramOffset
(
in
t
i
)
const
{
return
m_paramOffsets
[
i
];}
int
activeOffset
(
in
t
i
)
const
{
return
m_activeOffsets
[
i
];}
std
::
size_
t
paramOffset
(
std
::
size_
t
i
)
const
{
return
m_paramOffsets
[
i
];}
int
64_t
activeOffset
(
std
::
size_
t
i
)
const
{
return
m_activeOffsets
[
i
];}
private:
/// Extract function index and parameter name from a variable name
static
void
parseName
(
const
std
::
string
&
varName
,
in
t
&
index
,
std
::
string
&
name
);
static
void
parseName
(
const
std
::
string
&
varName
,
std
::
size_
t
&
index
,
std
::
string
&
name
);
/// Pointers to the included funtions
std
::
vector
<
IFitFunction
*>
m_functions
;
/// Individual function parameter offsets (function index in m_functions)
/// e.g. m_functions[i]->activeParameter(m_activeOffsets[i]+1) gives second active parameter of i-th function
std
::
vector
<
int
>
m_activeOffsets
;
std
::
vector
<
int
64_t
>
m_activeOffsets
;
/// Individual function parameter offsets (function index in m_functions)
/// e.g. m_functions[i]->parameter(m_paramOffsets[i]+1) gives second declared parameter of i-th function
std
::
vector
<
in
t
>
m_paramOffsets
;
std
::
vector
<
std
::
size_
t
>
m_paramOffsets
;
/// Keeps the function index for each declared parameter (parameter declared index)
std
::
vector
<
in
t
>
m_IFitFunction
;
std
::
vector
<
std
::
size_
t
>
m_IFitFunction
;
/// Keeps the function index for each active parameter (parameter active index)
std
::
vector
<
in
t
>
m_IFitFunctionActive
;
std
::
vector
<
std
::
size_
t
>
m_IFitFunctionActive
;
/// Number of active parameters
in
t
m_nActive
;
std
::
size_
t
m_nActive
;
/// Total number of parameters
in
t
m_nParams
;
std
::
size_
t
m_nParams
;
/// Function counter to be used in nextConstraint
mutable
in
t
m_iConstraintFunction
;
mutable
std
::
size_
t
m_iConstraintFunction
;
};
...
...
@@ -187,15 +188,15 @@ private:
class
PartialJacobian
:
public
Jacobian
{
Jacobian
*
m_J
;
///< pointer to the overall Jacobian
in
t
m_iP0
;
///< offset in the overall Jacobian for a particular function
int
m_iaP0
;
///< offset in the active Jacobian for a particular function
std
::
size_
t
m_iP0
;
///< offset in the overall Jacobian for a particular function
int
64_t
m_iaP0
;
///< offset in the active Jacobian for a particular function
public:
/** Constructor
* @param J :: A pointer to the overall Jacobian
* @param iP0 :: The parameter index (declared) offset for a particular function
* @param iap0 :: The active parameter index (declared) offset for a particular function
*/
PartialJacobian
(
Jacobian
*
J
,
in
t
iP0
,
int
iap0
)
:
m_J
(
J
),
m_iP0
(
iP0
),
m_iaP0
(
iap0
)
PartialJacobian
(
Jacobian
*
J
,
std
::
size_
t
iP0
,
int
64_t
iap0
)
:
m_J
(
J
),
m_iP0
(
iP0
),
m_iaP0
(
iap0
)
{}
/**
* Overridden Jacobian::set(...).
...
...
@@ -203,7 +204,7 @@ public:
* @param iP :: The parameter index of an individual function.
* @param value :: The derivative value
*/
void
set
(
int
iY
,
in
t
iP
,
double
value
)
void
set
(
std
::
size_t
iY
,
std
::
size_
t
iP
,
double
value
)
{
m_J
->
set
(
iY
,
m_iP0
+
iP
,
value
);
}
...
...
@@ -212,7 +213,7 @@ public:
* @param iY :: The index of the data point
* @param iP :: The parameter index of an individual function.
*/
double
get
(
int
iY
,
in
t
iP
)
double
get
(
std
::
size_t
iY
,
std
::
size_
t
iP
)
{
return
m_J
->
get
(
iY
,
m_iP0
+
iP
);
}
...
...
Code/Mantid/Framework/API/inc/MantidAPI/Expression.h
View file @
b78b2bb6
...
...
@@ -127,16 +127,16 @@ namespace Mantid
* between j and k contains the operator connecting the next token to this one.
* @param p :: The precedence of the connecting operator.
*/
Token
(
unsigned
int
i
,
unsigned
int
j
,
unsigned
in
t
k
,
size_t
p
)
Token
(
size_t
i
,
size_t
j
,
size_
t
k
,
size_t
p
)
:
is
(
i
),
ie
(
j
),
is1
(
k
),
prec
(
p
){}
/**
* The copy constructor.
*/
Token
(
const
Token
&
t
)
:
is
(
t
.
is
),
ie
(
t
.
ie
),
is1
(
t
.
is1
),
prec
(
t
.
prec
){}
unsigned
in
t
is
;
///< The index of the first symbol of the token.
unsigned
in
t
ie
;
///< The index of the last symbol of the token.
unsigned
in
t
is1
;
///< The index of the first symbol of the next token.
size_
t
is
;
///< The index of the first symbol of the token.
size_
t
ie
;
///< The index of the last symbol of the token.
size_
t
is1
;
///< The index of the first symbol of the next token.
size_t
prec
;
///< The precedence of the connecting operator.
};
/// The container type
...
...
Code/Mantid/Framework/API/inc/MantidAPI/IEventList.h
View file @
b78b2bb6
...
...
@@ -23,8 +23,8 @@ namespace API
public:
virtual
Mantid
::
API
::
EventType
getEventType
()
const
=
0
;
virtual
void
switchTo
(
Mantid
::
API
::
EventType
newType
)
=
0
;
virtual
void
addDetectorID
(
const
int
detID
)
=
0
;
virtual
bool
hasDetectorID
(
const
int
detID
)
const
=
0
;
virtual
void
addDetectorID
(
const
int
64_t
detID
)
=
0
;
virtual
bool
hasDetectorID
(
const
int
64_t
detID
)
const
=
0
;
virtual
void
clear
(
const
bool
removeDetIDs
)
=
0
;
virtual
void
reserve
(
size_t
num
)
=
0
;
virtual
bool
isSortedByTof
()
const
=
0
;
...
...
Code/Mantid/Framework/API/inc/MantidAPI/IEventWorkspace.h
View file @
b78b2bb6
...
...
@@ -44,7 +44,7 @@ namespace API
virtual
double
getTofMin
()
const
=
0
;
virtual
double
getTofMax
()
const
=
0
;
virtual
EventType
getEventType
()
const
=
0
;
virtual
IEventList
*
getEventListPtr
(
const
in
t
workspace_index
)
=
0
;
virtual
IEventList
*
getEventListPtr
(
const
std
::
size_
t
workspace_index
)
=
0
;
virtual
void
clearMRU
()
const
=
0
;
};
...
...
Code/Mantid/Framework/API/inc/MantidAPI/IFitFunction.h
View file @
b78b2bb6
...
...
@@ -239,7 +239,7 @@ public:
virtual
void
initialize
(){
this
->
init
();}
/// Returns the size of the fitted data (number of double values returned by the function getData())
virtual
in
t
dataSize
()
const
=
0
;
virtual
size_
t
dataSize
()
const
=
0
;
/// Returns a reference to the fitted data. These data are taken from the workspace set by setWorkspace() method.
virtual
const
double
*
getData
()
const
=
0
;
virtual
const
double
*
getWeights
()
const
=
0
;
...
...
@@ -250,46 +250,46 @@ public:
virtual
void
functionDeriv
(
Jacobian
*
out
);
/// Set i-th parameter
virtual
void
setParameter
(
in
t
,
const
double
&
value
,
bool
explicitlySet
=
true
)
=
0
;
virtual
void
setParameter
(
std
::
size_
t
,
const
double
&
value
,
bool
explicitlySet
=
true
)
=
0
;
/// Get i-th parameter
virtual
double
getParameter
(
in
t
i
)
const
=
0
;
virtual
double
getParameter
(
std
::
size_
t
i
)
const
=
0
;
/// Set parameter by name.
virtual
void
setParameter
(
const
std
::
string
&
name
,
const
double
&
value
,
bool
explicitlySet
=
true
)
=
0
;
/// Get parameter by name.
virtual
double
getParameter
(
const
std
::
string
&
name
)
const
=
0
;
/// Total number of parameters
virtual
in
t
nParams
()
const
=
0
;
virtual
std
::
size_
t
nParams
()
const
=
0
;
/// Returns the index of parameter name
virtual
in
t
parameterIndex
(
const
std
::
string
&
name
)
const
=
0
;
virtual
std
::
size_
t
parameterIndex
(
const
std
::
string
&
name
)
const
=
0
;
/// Returns the name of parameter i
virtual
std
::
string
parameterName
(
in
t
i
)
const
=
0
;
virtual
std
::
string
parameterName
(
std
::
size_
t
i
)
const
=
0
;
/// Checks if a parameter has been set explicitly
virtual
bool
isExplicitlySet
(
in
t
i
)
const
=
0
;
virtual
bool
isExplicitlySet
(
std
::
size_
t
i
)
const
=
0
;
/// Number of active (in terms of fitting) parameters
virtual
in
t
nActive
()
const
=
0
;
virtual
std
::
size_
t
nActive
()
const
=
0
;
/// Value of i-th active parameter. Override this method to make fitted parameters different from the declared
virtual
double
activeParameter
(
in
t
i
)
const
;
virtual
double
activeParameter
(
std
::
size_
t
i
)
const
;
/// Set new value of i-th active parameter. Override this method to make fitted parameters different from the declared
virtual
void
setActiveParameter
(
in
t
i
,
double
value
);
virtual
void
setActiveParameter
(
std
::
size_
t
i
,
double
value
);
/// Update parameters after a fitting iteration
virtual
void
updateActive
(
const
double
*
in
);
/// Returns "global" index of active parameter i
virtual
in
t
indexOfActive
(
in
t
i
)
const
=
0
;
virtual
std
::
size_
t
indexOfActive
(
std
::
size_
t
i
)
const
=
0
;
/// Returns the name of active parameter i
virtual
std
::
string
nameOfActive
(
in
t
i
)
const
=
0
;
virtual
std
::
string
nameOfActive
(
std
::
size_
t
i
)
const
=
0
;
/// Check if a declared parameter i is active
virtual
bool
isActive
(
in
t
i
)
const
=
0
;
virtual
bool
isActive
(
std
::
size_
t
i
)
const
=
0
;
/// Get active index for a declared parameter i
virtual
int
activeIndex
(
in
t
i
)
const
=
0
;
virtual
int
64_t
activeIndex
(
std
::
size_
t
i
)
const
=
0
;
/// Removes a declared parameter i from the list of active
virtual
void
removeActive
(
in
t
i
)
=
0
;
virtual
void
removeActive
(
std
::
size_
t
i
)
=
0
;
/// Restores a declared parameter i to the active status
virtual
void
restoreActive
(
in
t
i
)
=
0
;
virtual
void
restoreActive
(
std
::
size_
t
i
)
=
0
;
/// Return parameter index from a parameter reference. Usefull for constraints and ties in composite functions
virtual
int
getParameterIndex
(
const
ParameterReference
&
ref
)
const
=
0
;
virtual
int
64_t
getParameterIndex
(
const
ParameterReference
&
ref
)
const
=
0
;
/// Get a function containing the parameter refered to by the reference. In case of a simple function
/// it will be the same as ParameterReference::getFunction(). In case of a CompositeFunction it returns
/// a top-level function that contains the parameter. The return function itself can be a CompositeFunction
...
...
@@ -308,14 +308,14 @@ public:
/// Remove all ties
virtual
void
clearTies
()
=
0
;
/// Removes i-th parameter's tie
virtual
bool
removeTie
(
in
t
i
)
=
0
;
virtual
bool
removeTie
(
std
::
size_
t
i
)
=
0
;
/// Get the tie of i-th parameter
virtual
ParameterTie
*
getTie
(
in
t
i
)
const
=
0
;
virtual
ParameterTie
*
getTie
(
std
::
size_
t
i
)
const
=
0
;
/// Add a constraint to function
virtual
void
addConstraint
(
IConstraint
*
ic
)
=
0
;
/// Get constraint of i-th parameter
virtual
IConstraint
*
getConstraint
(
in
t
i
)
const
=
0
;
virtual
IConstraint
*
getConstraint
(
std
::
size_
t
i
)
const
=
0
;
/// Remove a constraint
virtual
void
removeConstraint
(
const
std
::
string
&
parName
)
=
0
;
/// Add a penalty to the output if some parameters do not satisfy constraints.
...
...
@@ -385,19 +385,19 @@ public:
* @param iP :: The index of a declared parameter.
* @param value :: The derivative value.
*/
virtual
void
set
(
int
iY
,
in
t
iP
,
double
value
)
=
0
;
virtual
void
set
(
std
::
size_t
iY
,
std
::
size_
t
iP
,
double
value
)
=
0
;
/** Get the value to a Jacobian matrix element.
* @param iY :: The index of a data point.
* @param iP :: The index of a declared parameter.
*/
virtual
double
get
(
int
iY
,
in
t
iP
)
=
0
;
virtual
double
get
(
std
::
size_t
iY
,
std
::
size_
t
iP
)
=
0
;
///@cond do not document
/** Add number to all iY (data) Jacobian elements for a given iP (parameter)
* @param value :: Value to add
*/
virtual
void
addNumberToColumn
(
const
double
&
value
,
const
int
&
iActiveP
)
virtual
void
addNumberToColumn
(
const
double
&
value
,
const
int
64_t
&
iActiveP
)
{
(
void
)
value
;
(
void
)
iActiveP
;
// Avoid compiler warning
throw
Kernel
::
Exception
::
NotImplementedError
(
"No addNumberToColumn() method of Jacobian provided"
);
...
...
Code/Mantid/Framework/API/inc/MantidAPI/IFunctionMD.h
View file @
b78b2bb6
...
...
@@ -126,7 +126,7 @@ public:
virtual
boost
::
shared_ptr
<
const
Workspace
>
getWorkspace
()
const
;
/// Returns the size of the fitted data (number of double values returned by the function)
virtual
in
t
dataSize
()
const
;
virtual
std
::
size_
t
dataSize
()
const
;
/// Returns a reference to the fitted data. These data are taken from the workspace set by setWorkspace() method.
virtual
const
double
*
getData
()
const
;
/// Returns a reference to the fitting weights.
...
...
@@ -151,7 +151,7 @@ protected:
/// Shared pointer to the workspace
boost
::
shared_ptr
<
const
API
::
IMDWorkspace
>
m_workspace
;
/// Size of the fitted data
in
t
m_dataSize
;
std
::
size_
t
m_dataSize
;
/// Pointer to the fitted data
boost
::
shared_array
<
double
>
m_data
;
/// Pointer to the fitting weights
...
...
@@ -160,7 +160,7 @@ protected:
// fields supporting IMDWorkspace iteration
/// maps dimension id to its index in m_dimensions
std
::
map
<
std
::
string
,
in
t
>
m_dimensionIndexMap
;
std
::
map
<
std
::
string
,
size_
t
>
m_dimensionIndexMap
;
/// dimensions used in this function in the expected order
std
::
vector
<
boost
::
shared_ptr
<
const
Mantid
::
Geometry
::
IMDDimension
>
>
m_dimensions
;
...
...
Code/Mantid/Framework/API/inc/MantidAPI/IFunctionMW.h
View file @
b78b2bb6
...
...
@@ -130,7 +130,7 @@ public:
virtual
boost
::
shared_ptr
<
const
API
::
Workspace
>
getWorkspace
()
const
;
/// Returns the size of the fitted data (number of double values returned by the function)
virtual
in
t
dataSize
()
const
;
virtual
std
::
size_
t
dataSize
()
const
;
/// Returns a reference to the fitted data. These data are taken from the workspace set by setWorkspace() method.
virtual
const
double
*
getData
()
const
;
virtual
const
double
*
getWeights
()
const
;
...
...
@@ -186,7 +186,7 @@ protected:
/// Upper bin index
int
m_xMaxIndex
;
/// Size of the fitted data
in
t
m_dataSize
;
std
::
size_
t
m_dataSize
;
/// Pointer to the fitted data
const
double
*
m_data
;
/// Pointer to the fitting weights
...
...
Code/Mantid/Framework/API/inc/MantidAPI/IMDIterator.h
View file @
b78b2bb6
...
...
@@ -49,7 +49,7 @@ class IMDWorkspace;
/// Get the size of the data
virtual
size_t
getDataSize
()
const
=
0
;
/// Get the i-th coordinate of the current cell
virtual
double
getCoordinate
(
in
t
i
)
const
=
0
;
virtual
double
getCoordinate
(
std
::
size_
t
i
)
const
=
0
;
/// Advance to the next cell. If the current cell is the last one in the workspace
/// do nothing and return false.
virtual
bool
next
()
=
0
;
...
...
Code/Mantid/Framework/API/inc/MantidAPI/MatrixWorkspace.h
View file @
b78b2bb6
...
...
@@ -36,10 +36,10 @@ namespace Mantid
/** Map from one type of index (e.g. workspace index) to another type (e.g. spectrum # or detector id #).
* Used by MatrixWorkspace to return maps.
*/
typedef
std
::
map
<
int
,
in
t
>
IndexToIndexMap
;
typedef
std
::
map
<
int
64_t
,
int64_
t
>
IndexToIndexMap
;
// Map for associating indexes to generated MDPoints.
typedef
std
::
map
<
int
,
Mantid
::
Geometry
::
MDPoint
>
MatrixMDPointMap
;
typedef
std
::
map
<
int
64_t
,
Mantid
::
Geometry
::
MDPoint
>
MatrixMDPointMap
;
//----------------------------------------------------------------------
// Forward Declaration
...
...
@@ -84,7 +84,7 @@ namespace Mantid
/// Typedef for the const workspace_iterator to use with a Workspace
typedef
workspace_iterator
<
const
LocatedDataRef
,
const
MatrixWorkspace
>
const_iterator
;
void
initialize
(
const
in
t
&
NVectors
,
const
in
t
&
XLength
,
const
in
t
&
YLength
);
void
initialize
(
const
std
::
size_
t
&
NVectors
,
const
std
::
size_
t
&
XLength
,
const
std
::
size_
t
&
YLength
);
virtual
~
MatrixWorkspace
();
void
setInstrument
(
const
Geometry
::
IInstrument_sptr
&
);
...
...
@@ -100,7 +100,7 @@ namespace Mantid
IndexToIndexMap
*
getSpectrumToWorkspaceIndexMap
()
const
;
IndexToIndexMap
*
getWorkspaceIndexToDetectorIDMap
()
const
;
IndexToIndexMap
*
getDetectorIDToWorkspaceIndexMap
(
bool
throwIfMultipleDets
)
const
;
void
getIndicesFromSpectra
(
const
std
::
vector
<
int
>&
spectraList
,
std
::
vector
<
int
>&
indexList
)
const
;
void
getIndicesFromSpectra
(
const
std
::
vector
<
int
64_t
>&
spectraList
,
std
::
vector
<
int
64_t
>&
indexList
)
const
;
/// Sample accessors
const
Sample
&
sample
()
const
;
...
...
@@ -112,7 +112,7 @@ namespace Mantid
Run
&
mutableRun
();
/// Get a detector object (Detector or DetectorGroup) for the given spectrum index
Geometry
::
IDetector_sptr
getDetector
(
const
int
index
)
const
;
Geometry
::
IDetector_sptr
getDetector
(
const
int
64_t
index
)
const
;
double
detectorTwoTheta
(
Geometry
::
IDetector_const_sptr
det
)
const
;
/// Calculates the drop of a neutron coming from the sample, there isn't currently a Mantid convention for which axis is vertical
double
gravitationalDrop
(
Geometry
::
IDetector_const_sptr
det
,
const
double
waveLength
)
const
;
...
...
@@ -131,11 +131,11 @@ namespace Mantid
// Section required for iteration
/// Returns the number of single indexable items in the workspace
virtual
in
t
size
()
const
=
0
;
virtual
std
::
size_
t
size
()
const
=
0
;
/// Returns the size of each block of data returned by the dataY accessors
virtual
in
t
blocksize
()
const
=
0
;
virtual
std
::
size_
t
blocksize
()
const
=
0
;
/// Returns the number of histograms in the workspace
virtual
in
t
getNumberHistograms
()
const
=
0
;
virtual
std
::
size_
t
getNumberHistograms
()
const
=
0
;
/// Sets MatrixWorkspace title
virtual
void
setTitle
(
const
std
::
string
&
);
...
...
@@ -143,7 +143,7 @@ namespace Mantid
virtual
const
std
::
string
getTitle
()
const
;
/// Returns the bin index for a given X value of a given workspace index
size_t
binIndexOf
(
const
double
xValue
,
const
int
index
=
0
)
const
;
size_t
binIndexOf
(
const
double
xValue
,
const
std
::
size_t
=
0
)
const
;
//----------------------------------------------------------------------
// DATA ACCESSORS
...
...
@@ -153,13 +153,13 @@ namespace Mantid
/// Returns a read-only (i.e. const) reference to the specified X array
/// @param index :: workspace index to retrieve.
const
MantidVec
&
readX
(
in
t
const
index
)
const
{
return
dataX
(
index
);
}
const
MantidVec
&
readX
(
std
::
size_
t
const
index
)
const
{
return
dataX
(
index
);
}
/// Returns a read-only (i.e. const) reference to the specified Y array
/// @param index :: workspace index to retrieve.
const
MantidVec
&
readY
(
in
t
const
index
)
const
{
return
dataY
(
index
);
}
const
MantidVec
&
readY
(
std
::
size_
t
const
index
)
const
{
return
dataY
(
index
);
}
/// Returns a read-only (i.e. const) reference to the specified E array
/// @param index :: workspace index to retrieve.
const
MantidVec
&
readE
(
in
t
const
index
)
const
{
return
dataE
(
index
);
}
const
MantidVec
&
readE
(
std
::
size_
t
const
index
)
const
{
return
dataE
(
index
);
}
/// Returns a read-only (i.e. const) reference to the specified X error array
/// @param index :: workspace index to retrieve.
const
MantidVec
&
readDx
(
int
const
index
)
const
{
return
dataDx
(
index
);
}
...
...
@@ -170,33 +170,33 @@ namespace Mantid
* @param[out] Y :: reference to the pointer to the const data vector
* @param[out] E :: reference to the pointer to the const error vector
*/
virtual
void
readYE
(
in
t
const
index
,
MantidVec
const
*&
Y
,
MantidVec
const
*&
E
)
const
virtual
void
readYE
(
std
::
size_
t
const
index
,
MantidVec
const
*&
Y
,
MantidVec
const
*&
E
)
const
{
Y
=
&
dataY
(
index
);
E
=
&
dataE
(
index
);
}
/// Returns the x data
virtual
MantidVec
&
dataX
(
int
const
index
)
=
0
;
virtual