This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <atlas/clapack.h> | |
#include <stdio.h> | |
int main() { | |
double a[9] = { 1,0,0, | |
-1,0,1, | |
2,1,1}; | |
double b[6] = {1,0, | |
1,2, | |
4,2}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LMM_expression | |
def initialize(content) | |
@content = content | |
end | |
attr_reader :content | |
def +(x) | |
LMM_expression.new(@content + x.content) | |
end | |
def *(x) | |
raise "can only call if both operands are single lmm_variable" if content.size !=1 || x.content.size !=1 |