Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F121316677
function_taking_eigenbase.cpp
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
Thu, Jul 10, 01:00
Size
418 B
Mime Type
text/x-c++
Expires
Sat, Jul 12, 01:00 (2 d)
Engine
blob
Format
Raw Data
Handle
27309797
Attached To
rDLMA Diffusion limited mixed aggregation
function_taking_eigenbase.cpp
View Options
#include <iostream>
#include <Eigen/Core>
using namespace Eigen;
template <typename Derived>
void print_size(const EigenBase<Derived>& b)
{
std::cout << "size (rows, cols): " << b.size() << " (" << b.rows()
<< ", " << b.cols() << ")" << std::endl;
}
int main()
{
Vector3f v;
print_size(v);
// v.asDiagonal() returns a 3x3 diagonal matrix pseudo-expression
print_size(v.asDiagonal());
}
Event Timeline
Log In to Comment