Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
INMOST
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Terekhov
INMOST
Commits
e4076bbf
Commit
e4076bbf
authored
Dec 27, 2017
by
Kirill Terekhov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix variables with const
parent
890097ab
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
56 deletions
+47
-56
Source/Headers/inmost_expression.h
Source/Headers/inmost_expression.h
+0
-42
Source/Headers/inmost_variable.h
Source/Headers/inmost_variable.h
+47
-14
No files found.
Source/Headers/inmost_expression.h
View file @
e4076bbf
...
...
@@ -1970,48 +1970,6 @@ namespace INMOST
}
};
template
<
class
A
>
class
stencil_expression
:
public
shell_expression
<
stencil_expression
<
A
>
>
{
dynarray
<
const_multiplication_expression
<
A
>
,
64
>
arg
;
INMOST_DATA_REAL_TYPE
value
;
public:
stencil_expression
(
const
dynarray
<
const_multiplication_expression
<
A
>
,
64
>
&
parg
)
:
arg
(
parg
)
{
value
=
0.0
;
for
(
typename
dynarray
<
const_multiplication_expression
<
A
>
,
64
>::
iterator
it
=
arg
.
begin
();
it
!=
arg
.
end
();
++
it
)
value
+=
it
->
GetValue
();
}
stencil_expression
(
const
stencil_expression
&
other
)
:
arg
(
other
.
arg
),
value
(
other
.
value
)
{}
stencil_expression
(
const
stencil_expression
&
other
,
dynarray
<
const_multiplication_expression
<
A
>
,
64
>
&
parg
)
:
arg
(
parg
),
value
(
other
.
value
)
{}
__INLINE
INMOST_DATA_REAL_TYPE
GetValue
()
const
{
return
value
;
}
__INLINE
void
GetJacobian
(
INMOST_DATA_REAL_TYPE
mult
,
Sparse
::
RowMerger
&
r
)
const
{
for
(
typename
dynarray
<
const_multiplication_expression
<
A
>
,
64
>::
iterator
it
=
arg
.
begin
();
it
!=
arg
.
end
();
++
it
)
it
->
GetJacobian
(
mult
,
r
);
}
__INLINE
void
GetJacobian
(
INMOST_DATA_REAL_TYPE
mult
,
Sparse
::
Row
&
r
)
const
{
for
(
typename
dynarray
<
const_multiplication_expression
<
A
>
,
64
>::
iterator
it
=
arg
.
begin
();
it
!=
arg
.
end
();
++
it
)
it
->
GetJacobian
(
mult
,
r
);
}
__INLINE
void
GetHessian
(
INMOST_DATA_REAL_TYPE
multJ
,
Sparse
::
Row
&
J
,
INMOST_DATA_REAL_TYPE
multH
,
Sparse
::
HessianRow
&
H
)
const
{
Sparse
::
Row
tmpJ
,
curJ
;
Sparse
::
HessianRow
tmpH
,
curH
;
for
(
typename
dynarray
<
const_multiplication_expression
<
A
>
,
64
>::
iterator
it
=
arg
.
begin
();
it
!=
arg
.
end
();
++
it
)
{
curJ
.
Clear
();
curH
.
Clear
();
it
->
GetHessian
(
multJ
,
curJ
,
multH
,
curH
);
Sparse
::
Row
::
MergeSortedRows
(
1.0
,
curJ
,
1.0
,
J
,
tmpJ
);
Sparse
::
HessianRow
::
MergeSortedRows
(
1.0
,
curH
,
1.0
,
H
,
tmpH
);
J
.
Swap
(
tmpJ
);
H
.
Swap
(
tmpH
);
}
}
};
template
<
class
A
>
class
function_expression
:
public
shell_expression
<
function_expression
<
A
>
>
{
...
...
Source/Headers/inmost_variable.h
View file @
e4076bbf
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment