Coder Social home page Coder Social logo

knapsack0-1's Introduction

Tarea Knapsack 0-1

Autores

  • Jonathan de Jesús Chávez Tabares
  • Carolina Pérez Alvarado
  • Agustín Salvador Quintanar de la Mora
  • Luis Delgado

Organización de archivos

Existen cuatro carpetas:

  • DP

  • Greedy

  • TestCasesGenerator

  • Report

Las primeras dos contienen lo siguiente:

  • main.cpp: Código fuente del problema.
  • resultados.txt: Archivo de texto con la respuesta a la instancia del problema.
  • tests: Carpeta que contiene los tests de prueba en formato .txt.
  • ejecutable.out: Archivo ejecutable (no existe al inicio).

La tercera contiene un script para generar test cases.

Y la cuarta contiene un reporte de los 2 algoritmos en Latex (el cual se encuentra en la parte de hasta abajo de este README).

Instrucciones de ejecución

Las instrucciones sirven para Linux/Mac, asegúrese de tener gcc instalado.

  1. Compile el código main.cpp usando el siguiente comando: g++ main.cpp -std=c++14 -O2 -o ejecutable.out.

Si se quiere imprimir las matrices, incluya: -D MATRIX.

Si se quiere imprimir los elementos seleccionados incluya: -D ELEMENTS.

Si se quiere correr la version optimizada de greedy incluya: -D OPTIMIZE.

  1. Una vez compilado, se generará el archivo ejecutable.out, este puede ejecutarse y recibir entrada por standard input. Para ejecutar una prueba ejecute el siguiente comando: ejecutable.out < tests/dp01.txt > resultados.txt. Esto guardará los resultados en resultados.txt.

Page 1 Page 2 Page 3

knapsack0-1's People

Contributors

agusquintanar avatar jonathanchaveztamales avatar

Watchers

 avatar  avatar

Forkers

agusquintanar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.