Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4a9da4f

Browse files
author
javiluli
committed
Modifico el README y minimas mejoras en el MAIN
1 parent 3ef6214 commit 4a9da4f

File tree

2 files changed

+36
-63
lines changed

2 files changed

+36
-63
lines changed

‎README.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ordenacion visual de un Array en Java
22

3-
Disponibles hasta 28 algoritmos de ordenacion y 8 variantes para el diseño grafico.
3+
Disponibles hasta 30 algoritmos de ordenacion y 8 variantes para el diseño grafico.
44

55
La carpeta _data/_ almacena archivos como videos e imagenes que afectan visualmente, no son necesarios para el funcionamiento del programa. Para su uso correcto se debe dejar de la misma forma en la que se decarga el repositorio, en una misma carpeta o directorio:
66

@@ -20,8 +20,9 @@ jar -cvfm ordenacionVisual.jar manifest.mf -C target/ ./
2020

2121
---
2222

23-
## Disponibles 28 algoritmos de ordenacion.
23+
## Disponibles 30 algoritmos de ordenacion
2424

25+
- Bidirectional Bubble
2526
- Binary insertion sort
2627
- Bitonic sort
2728
- Bogo sort
@@ -30,6 +31,7 @@ jar -cvfm ordenacionVisual.jar manifest.mf -C target/ ./
3031
- Bucket sort
3132
- [Cocktail sort](https://youtu.be/x_2L2QLYZR4)
3233
- [Cycle sort](https://youtu.be/v_hKwLFV5Ck)
34+
- DoubleSelection
3335
- [Gnome sort](https://youtu.be/JnEOrhdxe1w)
3436
- Gravity sort
3537
- [Heap sort](https://youtu.be/IYgJceePT5w)
@@ -53,7 +55,7 @@ jar -cvfm ordenacionVisual.jar manifest.mf -C target/ ./
5355

5456
---
5557

56-
## Disponibles 8 diseños graficos distintos.
58+
## Disponibles 8 diseños graficos distintos
5759

5860
- Barras clasicas
5961
- Piramide horizontal

‎src/Principal/MainAplicacion.java‎

Lines changed: 31 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -28,41 +28,13 @@
2828
import Adicionales.Social;
2929
import Ordenar.AdicionalesSorts;
3030
import Ordenar.FinSort;
31-
import Ordenar.Algoritmos.BidirectionalBubble;
32-
import Ordenar.Algoritmos.BinaryInsertion;
33-
import Ordenar.Algoritmos.Bitonic;
34-
import Ordenar.Algoritmos.Bogo;
35-
import Ordenar.Algoritmos.Bubble;
36-
import Ordenar.Algoritmos.BubbleOptimized;
37-
import Ordenar.Algoritmos.BucketSort;
38-
import Ordenar.Algoritmos.Cocktail;
39-
import Ordenar.Algoritmos.Cycle;
40-
import Ordenar.Algoritmos.Gnome;
41-
import Ordenar.Algoritmos.Gravity;
42-
import Ordenar.Algoritmos.Heap;
43-
import Ordenar.Algoritmos.Inserccion;
44-
import Ordenar.Algoritmos.Introsort;
45-
import Ordenar.Algoritmos.IterativeMerge;
46-
import Ordenar.Algoritmos.IterativeQuick;
47-
import Ordenar.Algoritmos.Merge;
48-
import Ordenar.Algoritmos.OddEven;
49-
import Ordenar.Algoritmos.Pancake;
50-
import Ordenar.Algoritmos.Pigeonhole;
51-
import Ordenar.Algoritmos.Quick;
52-
import Ordenar.Algoritmos.Radix;
53-
import Ordenar.Algoritmos.RecursiveBubble;
54-
import Ordenar.Algoritmos.RecursiveInsertion;
55-
import Ordenar.Algoritmos.RecursiveSelection;
56-
import Ordenar.Algoritmos.Selection;
57-
import Ordenar.Algoritmos.DoubleSelection;
58-
import Ordenar.Algoritmos.Shell;
59-
import Ordenar.Algoritmos.Stooge;
60-
import Ordenar.Algoritmos.Tim;
31+
import Ordenar.Algoritmos.*;
6132

6233
/**
6334
* @author Javier Delgado Rodriguez
6435
*/
6536
public class MainAplicacion extends AdicionalesSorts {
37+
6638
// NOMBRES DE LOS ALGORITMOS DE ORDENACION
6739
final String[] nombreAlgoritmos = {
6840
"Bidirectional Bubble",
@@ -95,6 +67,7 @@ public class MainAplicacion extends AdicionalesSorts {
9567
"Shell",
9668
"Stooge",
9769
"Tim"};
70+
9871
// DISEÑO GRAFICO DE LAS ANIMACIONES
9972
final static String[] nombreEstilosGraficos = {
10073
"Barras clasicas",
@@ -110,49 +83,49 @@ public class MainAplicacion extends AdicionalesSorts {
11083
private JFrame frame = new JFrame();
11184

11285
// JPANEL
113-
JPanel panelMenu = new JPanel();
114-
JPanel panelOpcionesMenu = new JPanel();
115-
static JPanel panelBarras = new JPanel();
86+
JPanel panelMenu = new JPanel();
87+
JPanel panelOpcionesMenu = new JPanel();
88+
static JPanel panelBarras = new JPanel();
11689

11790
// PANEL
11891
Panel panelVisorMemoria = new Panel();
11992

12093
// COMBOBOX
121-
JComboBox<String> comboBoxTipoSort = new JComboBox<String>(nombreAlgoritmos);
122-
static JComboBox<Object> comboBoxTiposGraficos = new JComboBox<Object>(nombreEstilosGraficos);
94+
JComboBox<String> comboBoxTipoSort = new JComboBox<String>(nombreAlgoritmos);
95+
static JComboBox<String> comboBoxTiposGraficos = new JComboBox<String>(nombreEstilosGraficos);
12396

12497
// JLABEL
125-
JLabel lblTitleAlgoritmo = new JLabel("Seleccionar algoritmo de ordenacion");
126-
JLabel lblTitle= new JLabel("Panel de control");
127-
JLabel lblNumeroBarras = new JLabel("Numero de elementos");
128-
JLabel lblRetardo = new JLabel("Retardo: 1 ms");
129-
JLabel lblTituloGraficos = new JLabel("Dise\u00F1o grafico");
130-
static JLabel lblTiempo = new JLabel("Tiempo: 0 m 0 s 0 ms");
131-
static JLabel lblMemoriaUsada = new JLabel("Memoria usada: 0 MB");
132-
static JLabel lblMemoriaMax = new JLabel("Memoria maxima: 0 MB");
133-
static JLabel lblMemoriaLibre = new JLabel("Memoria libre: 0 MB");
134-
static JLabel lblMemoriaTotal = new JLabel("Memoria total: 0 MB");
135-
static JLabel lblCambios = new JLabel("Cambios en el Array: 0");
136-
static JLabel lblAccesos = new JLabel("Accesos al Array: 0");
98+
JLabel lblTitleAlgoritmo = new JLabel("Seleccionar algoritmo de ordenacion");
99+
JLabel lblTitle= new JLabel("Panel de control");
100+
JLabel lblNumeroBarras = new JLabel("Numero de elementos");
101+
JLabel lblRetardo = new JLabel("Retardo: 1 ms");
102+
JLabel lblTituloGraficos = new JLabel("Dise\u00F1o grafico");
103+
static JLabel lblTiempo = new JLabel("Tiempo: 0 m 0 s 0 ms");
104+
static JLabel lblMemoriaUsada = new JLabel("Memoria usada: 0 MB");
105+
static JLabel lblMemoriaMax = new JLabel("Memoria maxima: 0 MB");
106+
static JLabel lblMemoriaLibre = new JLabel("Memoria libre: 0 MB");
107+
static JLabel lblMemoriaTotal = new JLabel("Memoria total: 0 MB");
108+
static JLabel lblCambios = new JLabel("Cambios en el Array: 0");
109+
static JLabel lblAccesos = new JLabel("Accesos al Array: 0");
137110

138111
// JBUTTON
139-
JButton btnOrdenar = new JButton("Ordenar");
140-
JButton btnDesordenar = new JButton("Desordenar");
141-
JButton btnSaltarSort = new JButton("Saltar Sort");
142-
JButton btnInformacion = new JButton("Informacion");
143-
JButton btnGithub = new JButton();
144-
JButton btnCodepen = new JButton();
112+
JButton btnOrdenar = new JButton("Ordenar");
113+
JButton btnDesordenar = new JButton("Desordenar");
114+
JButton btnSaltarSort = new JButton("Saltar Sort");
115+
JButton btnInformacion = new JButton("Informacion");
116+
JButton btnGithub = new JButton();
117+
JButton btnCodepen = new JButton();
145118

146119
// JTOGGLE BUTTON
147120
static JToggleButton tglbtnMulticolor = new JToggleButton("Ver multicolor");
148121

149122
// JSLIDER
150-
JSlider sliderRetardo = new JSlider();
151-
static JSlider sliderTamBarras = new JSlider();
123+
JSlider sliderRetardo = new JSlider();
124+
static JSlider sliderTamBarras = new JSlider();
152125

153126
// Tamaño de la ventana.
154-
static final int WIN_WIDTH = 1330;
155-
static final int WIN_HEIGHT = 1053;
127+
static final int WIN_WIDTH = 1330;// pixeles
128+
static final int WIN_HEIGHT = 1053;// pixeles
156129

157130
// Variables antes y despues de la ejecucion de una ordenacion.
158131
private int seleccionAlgoritmo = -1;
@@ -196,7 +169,6 @@ public void main() {
196169
barras = new DibujarGraficos();
197170
barras.setBounds(0, 0, DibujarGraficos.WIN_WIDTH, DibujarGraficos.WIN_HEIGHT);
198171
panelBarras.add(barras);
199-
200172
panelBarras.setVisible(true);
201173
frame.setResizable(false);
202174
frame.setTitle("Visualizador de ordenacion de matrices");
@@ -491,7 +463,7 @@ public void menuSorting() {
491463
MainAplicacion mainApp = new MainAplicacion();
492464
if (!accederOrdenacion) {
493465
textos();
494-
switch (seleccionAlgoritmo) {//
466+
switch (seleccionAlgoritmo) {
495467
case 0:sorts = new BidirectionalBubble (mainApp, barras.arrayPrincipal);break;
496468
case 1:sorts = new BinaryInsertion (mainApp, barras.arrayPrincipal);break;
497469
case 2:sorts = new Bitonic (mainApp, barras.arrayPrincipal);break;
@@ -606,7 +578,6 @@ private int calcMin(int tiempo) {
606578
int min = tiempo;
607579
min = (min / 1000) / 60;
608580
return min;
609-
610581
}
611582

612583
private int calcSeg(int tiempo) {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /