[General boards] [Fall 2018 courses] [Summer 2018 courses] [Winter 2018 courses] [Older or newer terms]

Using Eigen in Assignment 2


#1

Problem 3’s statement says that “Your implementation should be memory conserving. For example, the tridiagonal matrix can be stored in 3 one-dimensional
arrays, or another similar structure.”

Does this imply we need to implement a set of (tridiagonal) matrix functions from scratch (e.g., a matrix class and a vector class, supporting additions, multiplications, etc.), or is it allowed to use an existing library, such as Eigen?

Using a library such as Eigen has many advantages such as clarity of code (very meaningful type names) and high performance while also being lightweight and easy to install (header-only library for C++).

(Obviously I would only use the storage aspects of Eigen, and not the built-in numerical solvers.)

Thank you,
Andrei


#2

Hello, does anyone have any info on this? Thanks.


#3

You can use any library for a tridiagonal solver.
The code for a tridiagonal solver is very simple,
and even without C++ classes, it is easy to implement
with a 3xn or nx3 array. But it is up to you.


#4

Thank you for the clarification! I had a bug in my matrix class so I was able to implement the same thing using Eigen, but I ended up finding my bug anyway.