|
function | binaryunionstruct (in leftStruct, in rightStruct, in fieldOpCell, in leftFieldOpCell, in rightFieldOpCell) |
| BINARYUNIONSTRUCT applies a set of binary operations to the fields of two structures, each operation can return multiple results. More...
|
|
function | updaterescell () |
|
function | binarynotdefined (in varargin) |
|
function | auxcheckfuncell (in fieldOpCell) |
|
function | fieldfilterstruct (in InpStruct, in field2KeepList, in isCheckField) |
| FIELDFILTERSTRUCT leaves in input structure array only specified fields. More...
|
|
function | getleavelist (in SInp) |
| GETLEAVELIST generates a list of structure leave paths. More...
|
|
function | getleavelistint (in SInp) |
|
function | pathfilterstruct (in InpStruct, in path2KeepList) |
| PATHFILTERSTRUCT leaves in input structure array only specified paths. More...
|
|
function | auxgetfieldstruct (in SInp, in fieldName) |
|
function | sepcell2pathlist (in sepCell) |
|
function | strucdisp (in varargin) |
| STRUCDISP display structure outline. More...
|
|
function | struct2str (in SInp, in varargin) |
| STRUCDISP display structure outline. More...
|
|
function | structapplypath (in structB, in path, in value) |
| STRUCTAPPLYPATH for given a path '.a.b.c.d.' and a value and a structB, returns modified structB, so that structB.a.b.c.d==value;. More...
|
|
function | structcheckpath (in SInpArr, in pathStr) |
| STRUCTCHECKPATH for a given path ('a.b.c.d.' or {'a','b','c','d'} and a structure array SInpArr returns true, if this path exists for all structure array elements on any nesting level. More...
|
|
function | structcompare (in SX, in SY, in absTol, in relTol) |
| STRUCTCOMPARE compares two structures using the specified tolerance. More...
|
|
function | structcomparevec (in SX, in SY, in absTol, in relTol) |
| STRUCTCOMPARE compares two structures using the specified tolerance. More...
|
|
function | structcompare1darray (in SX, in SY, in absTol, in relTol) |
| STRUCTCOMPARE1D compares 1-dimentional structural arrays. More...
|
|
function | structcomparescalar (in SX, in SY, in absTol, in relTol) |
| STRUCTCOMPARE1D compares the scalar structures. More...
|
|
function | compfun (in x, in y, in absTol, in relTol) |
| COMPFUN compares two different objects (ideally - of any type) More...
|
|
function | toNumericSupportingMinus (in x) |
|
function | structgetpath (in SInpArr, in pathStr, in isPresenceChecked, in isJustCheck) |
| STRUCTGETPATH extract a value from a given structure array using a path specified either as a string or as a sequence of field names separated by dots. It is assumed that all values located at the specified path are of the same size. More...
|
|
function | getField (in SInpArr, in fieldName, in isPresenceChecked) |
|
function | unionstructsalongdim (in catDimension, in varargin) |
| UNIONSTRUCTS unites structures with the same fields by concatenating the corresponding fields along the specified dimension. More...
|
|
function | updateleaves (in SData, in fUpdateFunc) |
| UPDATELEAVES applies the specified function to each structure leave value and returns the updated structure. More...
|
|
function | fUpdateExtFunc (in val, in path) |
|
function | updateleavesext (in SData, in fUpdateFunc) |
| UPDATELEAVESEXT applies the specified function to each structure leave value and returns the updated structure, potentially with changed field paths. More...
|
|
function | setSDataField (in subFieldNameList, in value) |
|
function mxberry::core::struct::binaryunionstruct |
( |
in |
leftStruct, |
|
|
in |
rightStruct, |
|
|
in |
fieldOpCell, |
|
|
in |
leftFieldOpCell, |
|
|
in |
rightFieldOpCell |
|
) |
| |
BINARYUNIONSTRUCT applies a set of binary operations to the fields of two structures, each operation can return multiple results.
* Usage:
* [S1,S2,S3,. . .,Sn]=binaryunionstruct(leftStruct,rightStruct,. . .
* fieldOpCell,leftFieldOpCell,rightFieldOpCell)
*
* Input:
* regular:
* leftStruct: struct[n1,n2,. . .,nk] - first input structure array
*
* rightStruct: struct[n1,n2,. . .,nk] - second input structure array
*
* fieldOpCell: cell[1,nOps] - cell array of operations applied
* to common fileds of two structures, each operation should return
* n arguments
*
* optional:
*
* leftFieldOpCell: cell[1,nOps] - cell array of operations that
* applied to the fields that are present only in the first
* structure, each operation should return n arguments
*
* default value: @deal
*
* rightFieldOpCell: cell[1,nOps] - cell array of operations that
* applied to the fields that are present only in the second
* structure, each operation should return n arguments
*
* default value: @deal
*
* Output:
* S1: struct [n1,n2,. . .,nk,nOps] - contains the first outputs from operations
* S2: struct [n1,n2,. . .,nk,nOps] - contains the second outputs from operations
* . . .
* Sn: struct [n1,n2,. . .,nk,nOps] - contains n'th outputs from operatons
*
- Author
- Peter Gagarinov, PhD pgaga.nosp@m.rino.nosp@m.v@gma.nosp@m.il.c.nosp@m.om
- Copyright
- 2015-2016 Peter Gagarinov, PhD
2015 Moscow State University,
Faculty of Computational Mathematics and Computer Science,
System Analysis Department
function mxberry::core::struct::getleavelist |
( |
in |
SInp | ) |
|
GETLEAVELIST generates a list of structure leave paths.
* Input:
* regular:
* SInp: struct[] - input structure array
*
* Output:
* pathSpecList: cell[nPaths,1] of cell[1,] of char[1,]/cell[1,] of double[1,]
*
* - list of path specifications in the following form:
* {{ind11,ind12,. . .,ind1n1},field1,. . .
* {ind21,ind22,. . .,ind2n2},field2,. . .
* {ind31,ind32,. . .,ind3n3},field3}
* which corresponds to
* S(ind11,ind12,. . .,ind1n1).field1(. . .
* ind21,ind22,. . .,ind2n2).field2(. . .
* ind31,ind32,. . .,ind3n3).field3
*
* valueList: cell[nPaths,1] of any[] - list of leave values
*
- Author
- Peter Gagarinov, PhD pgaga.nosp@m.rino.nosp@m.v@gma.nosp@m.il.c.nosp@m.om
- Copyright
- 2015-2016 Peter Gagarinov, PhD
2015 Moscow State University,
Faculty of Computational Mathematics and Computer Science,
System Analysis Department
function mxberry::core::struct::strucdisp |
( |
in |
varargin | ) |
|
STRUCDISP display structure outline.
* Usage: STRUCDISP(STRUC,fileName,'depth',DEPTH,'printValues',PRINTVALUES,. . .
* 'maxArrayLength',MAXARRAYLENGTH) stores
* the hierarchical outline of a structure and its substructures into
* the specified file
*
* Input:
* regular:
* SInp: struct[1,1] - is a structure datatype with unknown field
* content. It can be either a scalar or a vector, but not a
* matrix. STRUC is the only mandatory argument in this function.
* All other arguments are optional.
*
* optional
* fileName: char[1,] is the name of the file to which the output
* should be printed. if this argument is not defined, the output
* is printed to the command window.
*
* properties
* depth: numeric[1,1] - the number of hierarchical levels of
* the structure that are printed. If DEPTH is smaller than zero,
* all levels are printed. Default value for DEPTH is -1
* (print all levels).
*
* printValues: logical[1,1] - flag that states if the field values
* should be printed as well. The default value is 1 (print values)
*
* maxArrayLength: numberic[1,1] - a positive integer,
* which determines up to which length or size the values of
* a vector or matrix are printed. For a vector holds that
* if the length of the vector is smaller or equal to
* MAXARRAYLENGTH, the values are printed. If the vector is
* longer than MAXARRAYLENGTH, then only the size of the
* vector is printed. The values of a 2-dimensional (m,n)
* array are printed if the number of elements (m x n) is
* smaller or equal to MAXARRAYLENGTH. For vectors and arrays,
* this constraint overrides the PRINTVALUES flag.
* numberFormat: char[1,] - format specification used for displaying
* numberic values, passed directly to sprintf, by default '%g' is
* used
* Output:
* regular:
* resStr: char [1,] - resulting string with displayed
* structure contents
*
- Author
- Peter Gagarinov, PhD pgaga.nosp@m.rino.nosp@m.v@gma.nosp@m.il.c.nosp@m.om
- Copyright
- 2015-2016 Peter Gagarinov, PhD
2015 Moscow State University,
Faculty of Computational Mathematics and Computer Science,
System Analysis Department
function mxberry::core::struct::struct2str |
( |
in |
SInp, |
|
|
in |
varargin |
|
) |
| |
STRUCDISP display structure outline.
* Usage: STRUCT2STR(STRUC,fileName,'depth',DEPTH,'printValues',PRINTVALUES,. . .
* 'maxArrayLength',MAXARRAYLENGTH) stores
* the hierarchical outline of a structure and its substructures into
* the specified file
*
* Input:
* regular:
* SInp: struct[1,1] - is a structure datatype with unknown field
* content. It can be either a scalar or a vector, but not a
* matrix. STRUC is the only mandatory argument in this function.
* All other arguments are optional.
*
* optional
* fileName: char[1,] is the name of the file to which the output
* should be printed. if this argument is not defined, the output
* is printed to the command window.
*
* properties
* depth: numeric[1,1] - the number of hierarchical levels of
* the structure that are printed. If DEPTH is smaller than zero,
* all levels are printed. Default value for DEPTH is -1
* (print all levels).
*
* printValues: logical[1,1] - flag that states if the field values
* should be printed as well. The default value is 1 (print values)
*
* maxArrayLength: numeric[1,1] - a positive integer,
* which determines up to which length or size the values of
* a vector or matrix are printed. For a vector holds that
* if the length of the vector is smaller or equal to
* MAXARRAYLENGTH, the values are printed. If the vector is
* longer than MAXARRAYLENGTH, then only the size of the
* vector is printed. The values of a 2-dimensional (m,n)
* array are printed if the number of elements (m x n) is
* smaller or equal to MAXARRAYLENGTH. For vectors and arrays,
* this constraint overrides the PRINTVALUES flag.
* numberFormat: char[1,] - format specification used for displaying
* numberic values, passed directly to sprintf, by default '%g' is
* used
*
- Author
- Peter Gagarinov, PhD pgaga.nosp@m.rino.nosp@m.v@gma.nosp@m.il.c.nosp@m.om
- Copyright
- 2015-2016 Peter Gagarinov, PhD
2015 Moscow State University,
Faculty of Computational Mathematics and Computer Science,
System Analysis Department
function mxberry::core::struct::structgetpath |
( |
in |
SInpArr, |
|
|
in |
pathStr, |
|
|
in |
isPresenceChecked, |
|
|
in |
isJustCheck |
|
) |
| |
STRUCTGETPATH extract a value from a given structure array using a path specified either as a string or as a sequence of field names separated by dots. It is assumed that all values located at the specified path are of the same size.
* Usage:
* SRes=structgetpath(SInpArr,pathStr)
* SRes=structgetpath(SInpArr,pathStr,false)
*
* Input:
* regular:
* SInpArr: struct[] - input struct array
* pathStr: char[1,]/cell[1,] of char[1,] - path in the SInp
* isPresenceChecked: logical[1,1] - if true, the function doesn't
* throw an exception if the path is not found and returns
* isThere=false instead.
* Default value is FALSE.
* isJustCheck: logical[1,1] - if true, no value is extracted, just a
* presence of the specified path is checked. When
* isJustCheck=true isPresenceChecked is automatically set to true
* Default value is FALSE.
*
* Note: when isJustCheck=true the function is more prohibitive as it
* doesn't check for consistency of sizes for values of different
* structure array elements. However, when isJustCheck=false the
* function attempts to extract values concatenating them via cell2mat
* function. This may result into either a failure
* (isPresenceChecked=false) or isThere=false when
* (isPresenceChecked=true) even if with isJustCheck=true the function
* returned isThere=true.
*
* Output:
* SRes: struct[] - struct array of the same size as SInpArr
* isThere: logical[1,1] - if false, the specified path is not found in
* SInpArr
*
- Author
- Peter Gagarinov, PhD pgaga.nosp@m.rino.nosp@m.v@gma.nosp@m.il.c.nosp@m.om
- Copyright
- 2015-2016 Peter Gagarinov, PhD
2011-2015 Moscow State University,
Faculty of Computational Mathematics and Computer Science,
System Analysis Department