BioDynaMo
v1.05.125-2619fe54
Home
Main Page
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
i
k
l
n
o
p
r
s
t
u
v
w
Functions
a
b
c
d
e
f
g
i
l
n
o
p
r
s
t
u
v
w
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
b
c
d
e
f
i
n
p
r
t
v
Enumerations
Enumerator
Related Functions
:
d
e
i
m
o
p
r
s
t
Files
File List
File Members
All
_
b
c
d
h
n
p
s
Functions
Variables
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
core
multi_simulation
optimization_param_type
set_param.h
Go to the documentation of this file.
1
// -----------------------------------------------------------------------------
2
//
3
// Copyright (C) 2021 CERN & University of Surrey for the benefit of the
4
// BioDynaMo collaboration. All Rights Reserved.
5
//
6
// Licensed under the Apache License, Version 2.0 (the "License");
7
// you may not use this file except in compliance with the License.
8
//
9
// See the LICENSE file distributed with this work for details.
10
// See the NOTICE file distributed with this work for additional information
11
// regarding copyright ownership.
12
//
13
// -----------------------------------------------------------------------------
14
15
#ifndef CORE_MULTI_SIMULATION_OPTIMIZATION_PARAM_TYPE_SET_PARAM_H_
16
#define CORE_MULTI_SIMULATION_OPTIMIZATION_PARAM_TYPE_SET_PARAM_H_
17
18
#include <string>
19
#include <vector>
20
21
#include "
core/multi_simulation/optimization_param_type/optimization_param_type.h
"
22
23
namespace
bdm
{
24
27
struct
SetParam
:
public
OptimizationParamType
{
28
SetParam
() =
default
;
29
SetParam
(
const
std::string& name,
const
std::vector<real_t> v)
30
:
OptimizationParamType
(name),
values
(v) {}
31
32
OptimizationParamType
*
GetCopy
()
const override
{
33
return
new
SetParam
(*
this
);
34
}
35
36
size_t
size
()
const
{
return
values
.size(); }
37
real_t
at
(
size_t
n)
const
{
return
values
.at(n); }
38
39
uint32_t
GetNumElements
()
const override
{
return
this->
size
(); }
40
real_t
GetValue
(
int
n)
const override
{
return
this->
at
(n); }
41
42
std::vector<real_t>
values
;
43
BDM_CLASS_DEF_OVERRIDE
(
SetParam
, 1);
44
};
45
46
}
// namespace bdm
47
48
#endif // CORE_MULTI_SIMULATION_OPTIMIZATION_PARAM_TYPE_SET_PARAM_H_
bdm::SetParam::GetValue
real_t GetValue(int n) const override
Definition:
set_param.h:40
optimization_param_type.h
bdm::SetParam
Definition:
set_param.h:27
bdm
Definition:
agent.cc:39
bdm::SetParam::GetNumElements
uint32_t GetNumElements() const override
Definition:
set_param.h:39
bdm::real_t
double real_t
Definition:
real_t.h:21
bdm::SetParam::size
size_t size() const
Definition:
set_param.h:36
bdm::SetParam::GetCopy
OptimizationParamType * GetCopy() const override
Definition:
set_param.h:32
bdm::OptimizationParamType
An interface for creating different types of optimization parameters.
Definition:
optimization_param_type.h:27
bdm::SetParam::at
real_t at(size_t n) const
Definition:
set_param.h:37
bdm::SetParam::SetParam
SetParam(const std::string &name, const std::vector< real_t > v)
Definition:
set_param.h:29
bdm::SetParam::values
std::vector< real_t > values
Definition:
set_param.h:42
bdm::SetParam::BDM_CLASS_DEF_OVERRIDE
BDM_CLASS_DEF_OVERRIDE(SetParam, 1)
bdm::SetParam::SetParam
SetParam()=default
Generated by
1.8.17