Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F82877067
aka_types_eigen_matrix_plugin.hh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Sep 13, 23:23
Size
2 KB
Mime Type
text/x-c++
Expires
Sun, Sep 15, 23:23 (2 d)
Engine
blob
Format
Raw Data
Handle
20717963
Attached To
rAKA akantu
aka_types_eigen_matrix_plugin.hh
View Options
/**
* Copyright (©) 2014-2023 EPFL (Ecole Polytechnique Fédérale de Lausanne)
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* This file is part of Akantu
*
* Akantu is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* Akantu is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Akantu. If not, see <http://www.gnu.org/licenses/>.
*/
#define AKANTU_EIGEN_VERSION \
(EIGEN_WORLD_VERSION * 10000 + EIGEN_MAJOR_VERSION * 1000 + \
EIGEN_MAJOR_VERSION)
using
size_type
=
Index
;
template
<
typename
PlainObjectType
,
int
MapOptions
,
typename
StrideType
>
EIGEN_STRONG_INLINE
Matrix
(
const
Map
<
PlainObjectType
,
MapOptions
,
StrideType
>
&
other
)
:
Base
(
other
.
derived
().
rows
()
*
other
.
derived
().
cols
(),
other
.
derived
().
rows
(),
other
.
derived
().
cols
())
{
// AKANTU_DEBUG_WARNING("copy operator Map in matrix");
Base
::
_check_template_params
();
Base
::
_resize_to_match
(
other
);
// FIXME/CHECK: isn't *this = other.derived() more efficient. it allows to
// go for pure _set() implementations, right?
*
this
=
other
;
}
template
<
typename
PlainObjectType
,
int
MapOptions
,
typename
StrideType
>
EIGEN_STRONG_INLINE
Matrix
&
operator
=
(
const
Map
<
PlainObjectType
,
MapOptions
,
StrideType
>
&
map
)
{
// AKANTU_DEBUG_WARNING("operator= Map in matrix");
return
Base
::
_set
(
map
);
}
template
<
bool
_is_vector
=
IsVectorAtCompileTime
,
std
::
enable_if_t
<
_is_vector
>
*
=
nullptr
>
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE
Matrix
(
std
::
initializer_list
<
Scalar
>
list
)
:
Base
(
list
)
{}
#if AKANTU_EIGEN_VERSION <= 34000
template
<
bool
_is_vector
=
IsVectorAtCompileTime
,
std
::
enable_if_t
<
not
_is_vector
>
*
=
nullptr
>
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE
Matrix
(
std
::
initializer_list
<
std
::
initializer_list
<
Scalar
>>
list
)
:
Base
(
list
)
{}
#endif
Event Timeline
Log In to Comment