[eigen] Operations involving constants |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: [eigen] Operations involving constants
- From: oz <dwwork@xxxxxxxxx>
- Date: Wed, 22 Oct 2014 10:30:48 -0600
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=4JysvPj7oCNyn5i8Td7pEF5hDWTe9uVjpEVePVoA5uU=; b=fozYliArLbyeMG+m1X8i4+53GiCvEa0Cmn7abhywR9XlwyPi+udxFSGT47dvMIpwtp mpPWmTVe9kaq320/MJacTm27GknABAO9PN9+u1z0nUXSJ/9R8ZcW0ZGc/Honoc0C6V4I ZxzTzwb3FowTrfvJfSGldp3OsT7UHfaadJDlw04b9q1VQsYDf3Sjd1s7TtaMWwH3wnuM ByNYT0rOyAfrt+sQQtRu2uigt5rkngA2NcDBhjRHgj+HtCew9vfcb02YrfJF5ES4n1aA F6YxDjJ00qtJkIuSbJjBM0VVYRfWrXuoabv/nAGencG+CQsyWNvYKaUpCdS2d5AOb26W ddfQ==
So I'm working on my own little test class to learn expression
templates, etc. and have run into a bit of a snag.
I'd appreciate any help in understanding. I'm uncertain how to implement
the following kinds expressions:
2*array
array+1
It looks like Eigen somehow implements this in the Unary Operators,
which makes sense, but I can't figure it out.
I tried encapsulating the constant into a Constant<T> class, and using
the BinaryOps like normal, but that gave me segfaults for some reason.
How would y'all suggest I approach this issue?
Thanks for the help.
Dalon