This file contains hidden or 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
%define numN ebp+8 | |
%define numM ebp+12 | |
%define numConstante ebp+16 | |
%define dirMatrizA ebp+16 | |
%define dirMatrizB ebp+20 | |
%define dirMatrizRespuesta ebp+24 | |
segment .data | |
m1: dd 5,6,7,1,3,2,8,4,5 | |
m2: dd 3,6,4,3,8,2,5,1,1,3,6,7 |
This file contains hidden or 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
nasm -f elf matrix.asm -g | |
gcc -shared matrix.o -o libmatrix.so | |
sudo rm /usr/local/lib/libmatrix.so | |
sudo rm /usr/lib/libmatrix.so | |
sudo rm /usr/include/matrix.h | |
sudo rm /usr/local/include/matrix.h | |
sudo cp libmatrix.so /usr/local/lib/ | |
sudo cp libmatrix.so /usr/lib/ | |
sudo cp matrix.h /usr/include/ | |
sudo cp matrix.h /usr/local/include/ |
This file contains hidden or 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 <stdio.h> | |
#include <matrix.h> | |
int main(){ | |
int n = 3; | |
int m = 4; | |
int m2 = 5; |
This file contains hidden or 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
%define numN ebp+8 | |
%define numM ebp+12 | |
%define numConstante ebp+16 | |
%define dirMatrizA ebp+16 | |
%define dirMatrizB ebp+20 | |
%define dirMatrizRespuesta ebp+24 | |
%define numAN ebp+8 | |
%define numAM ebp+12 | |
%define numBN ebp+16 | |
%define numBM ebp+20 |
This file contains hidden or 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
%define numN ebp+8 | |
%define numM ebp+12 | |
%define numConstante ebp+16 | |
%define dirMatrizA ebp+16 | |
%define dirMatrizB ebp+20 | |
%define dirMatrizRespuesta ebp+24 | |
segment .data | |
;; Define an NxM matrix (2x3 this time for testing) |
This file contains hidden or 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 <stdio.h> | |
extern void transpuesta(); | |
int main(){ | |
float t[2][4]; | |
float f[4][2]= {{1,2},{3,4},{5,6},{7,8}}; |
This file contains hidden or 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
--f x = exp((-x^2)+2) - x*sin(2*x-3) + 2 | |
-- Incremental | |
r = map (\x -> (f x * f (x+1e-1) < 0,x,(x+1e-1))) [-5,-5+1e-1..5.0] | |
b = filter (\(a,b,c) -> a == True ) r | |
t i n = let m = (n+i)/ 2 | |
in f m |
This file contains hidden or 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
-- Incremental | |
r = map (\x -> (f x * f (x+1) < 0,x,(x+1))) [0..10.0] | |
-- | |
b = filter (\(a,b,c) -> a == True ) r | |
f x = cos (x) - x |
This file contains hidden or 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
toNetFinAuto :: Eq a => Grammar a b -> (a,Graph a (Symbol a b)) | |
toNetFinAuto g = let (i,lregexpr) = fromGrmToRegExpr g | |
(_,_,gr') = (foldl (\(_,f,gr) r -> toGraphG (f+1) (f+2) gr r) (0,0,newGraph) ) $ map snd lregexpr | |
in (i,gr') | |
En esta lambda (\(_,f,gr) r -> toGraphG (f+1) (f+2) gr r) (0,0,newGraph) el valor para f que tenías es el de la segunda posición de la tupla, ese comenzaba en 1, luego ese es el que queda en f, y comienza desde 2, porque el llama toGraphG con (f+1) y (f+2) que serian 2 y 3, tengo que ver como estas haciendo dentro de toGraphG para poder que quede numerado desde 0, mañana lo mirare. |
This file contains hidden or 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
hola ente |