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
/*Códigos correspondientes al trabajo realizado para el ISUM 2012. | |
* Test de rendimiento de los algoritmos de ordenamiento Quicksort, | |
* Mezcla y burbuja implementados en C++, Fortran y Python. | |
* Guanajuato, Guanajuato, México (14-16 de Marzo 2012) | |
* | |
* Programa: mergesort.c | |
* compilar: gcc -Wall -O mergesort.c -o mergesort | |
* Uso: $./mergesort 1000.dat | |
* El tamaño del array se toma del nombre del archivo (1000.dat) | |
* Salida: |
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
/*Códigos correspondientes al trabajo realizado para el ISUM 2012. | |
* Test de rendimiento de los algoritmos de ordenamiento Quicksort, | |
* Mezcla y burbuja implementados en C++, Fortran y Python. | |
* Guanajuato, Guanajuato, México (14-16 de Marzo 2012) | |
* | |
* Programa: burbuja.cpp | |
* compilar: gcc -Wall -O burbuja.cpp -o burbuja | |
* Uso: $./burbuja 1000.dat | |
* El tamaño del array se toma del nombre del archivo (1000.dat) | |
* Salida: |
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
/*Códigos correspondientes al trabajo realizado para el ISUM 2012. | |
* Test de rendimiento de los algoritmos de ordenamiento Quicksort, | |
* Mezcla y burbuja implementados en C++, Fortran y Python. | |
* Guanajuato, Guanajuato, México (14-16 de Marzo 2012) | |
* | |
* Programa: quicksort.cpp | |
* compilar: gcc -Wall -O quicksort.cpp -o quicksort | |
* Uso: $./quicksort 1000.dat | |
* El tamaño del array se toma del nombre del archivo (1000.dat) | |
* Salida: |
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
SUBROUTINE abrirfiles | |
INTEGER*4 long | |
CHARACTER*11 status,form | |
CHARACTER*72 cfile | |
CHARACTER*80 fname | |
!!Abrir archivos de lectura y escritura | |
iarg=iargc() | |
if(iarg.ne.1) STOP 'Exactamente introducir un argumento en la linea de comando' | |
CALL GETARG(1,cfile,long) | |
OPEN(1,FILE=cfile,STATUS='old',ERR=8000) |
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
#! /usr/bin/env python | |
#Códigos correspondientes al trabajo realizado para el ISUM 2012. | |
# Test de rendimiento de los algoritmos de ordenamiento Quicksort, | |
# Mezcla y burbuja implementados en C++, Fortran y Python. | |
# Guanajuato, Guanajuato, México (14-16 de Marzo 2012) | |
# | |
# Programa: burbuja.py | |
# Uso: $python burbuja.py 1000.dat | |
# El tamaño del array se toma del nombre del archivo (1000.dat) |
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
SUBROUTINE abrirfiles | |
INTEGER*4 long | |
CHARACTER*11 status,form | |
CHARACTER*72 cfile | |
CHARACTER*80 fname | |
!!Abrir archivos de lectura y escritura | |
iarg=iargc() | |
if(iarg.ne.1) STOP 'Exactamente introducir un argumento en la linea de comando' | |
CALL GETARG(1,cfile,long) | |
OPEN(1,FILE=cfile,STATUS='old',ERR=8000) |
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
SUBROUTINE abrirfiles | |
INTEGER*4 long | |
CHARACTER*11 status,form | |
CHARACTER*72 cfile | |
CHARACTER*80 fname | |
!!Abrir archivos de lectura y escritura | |
iarg=iargc() | |
if(iarg.ne.1) STOP 'Exactamente introducir un argumento en la linea de comando' | |
CALL GETARG(1,cfile,long) | |
OPEN(1,FILE=cfile,STATUS='old',ERR=8000) |
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
#!/usr/bin/python | |
f = open("Total_energy.dat", "r") | |
# print "set ylabel 'E'" | |
# print "set xlabel 'r'" | |
# print "set title 'Energia vs radio'" | |
for line in f: | |
line = line[11:15] + "\t" + line[47:58] | |
print line | |
# do something with line |
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
<?php | |
//Documentation on: | |
// http://en.wikipedia.org/wiki/B%C3%A9zier_curve | |
//Implemented by: jfajardo. | |
//NOTES: This program fails with a length of array > 1020 elements. | |
//Binomial coefficient | |
function binomial_coeff($n, $k){ |
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 <algorithm> | |
#include <iostream> | |
#include <vector> | |
#define NELEMS(x) (sizeof(x) / sizeof(x[0])) | |
using namespace std; | |
double minval(double x[]) | |
{ |
OlderNewer