vichoko / distribution-sweep Goto Github PK
View Code? Open in Web Editor NEWTarea 1: Diseño & Analisis de Algoritmos
Tarea 1: Diseño & Analisis de Algoritmos
Actualmente queda la cagá con todos los archivos que se crean en el path del proyecto. Sería bacan que los temporales se eliminen o queden en alguna carpeta y los importantes se distingan-
Al parecer, los atributos:
public int initialOffset, finalOffset;
No se utilizan.
Lanzo este error:
Starting Sweep...
Disconnected from the target VM, address: '127.0.0.1:50821', transport: 'socket'
Exception in thread "main" java.lang.NumberFormatException: For input string: "(12.272"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
at java.lang.Double.parseDouble(Double.java:538)
at utils.UtilsIOSegments.getSegments(UtilsIOSegments.java:34)
at utils.UtilsIOSegments.readPage(UtilsIOSegments.java:99)
at utils.UtilsIOSegments.readPage(UtilsIOSegments.java:70)
at algorithm.DistributionSweep.writeIntersections(DistributionSweep.java:298)
at algorithm.DistributionSweep.recursiveDistributionSweep(DistributionSweep.java:184)
at algorithm.DistributionSweep.getIntersections(DistributionSweep.java:44)
at test.first.main(first.java:32)
Process finished with exit code 1
Debe ser un caso de borde. Voy a seguir testeando para ver si pasa denuevo. No se como apareció ese '(' ahí.
En el archivo fuente no aparece ningun '(' y las apariencias de 12.272 fueron;
Line 120: 12.272,78.511,0.175,78.511,
Line 7645: 12.272,48.777,12.272,69.215,
Line 7645: 12.272,48.777,12.272,69.215,
Line 64501: 84.633,92.564,84.633,12.272,
porque usa buffers. Veamos como funciona y cachamos que hacer.
Queda testear, voy a empezar a probar para solucionar los primeros errores que pueden aparecer.
@cfierro94 Hiciste pruebas del mergeSort?
Al ordenar 7MB de segmentos, solo quedan 1MB ordenados en el archivo final.
Para n muy grandes aparecen segmentos con coordenadas negativas, esto produce problemas en el codigo.
Siempre el resultado de sort queda en run_1.tmp.
Si ordeno 2 archivos, se sobre-escribe el antiguo.
Al hacer primeros debug se verifica que mergeSort no esta haciendo ningun ordenamiento aparente sobre el arreglo original.
Replicar:
Muchos de los archivos se estan creando duplicados, es extraño.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.