From c4efdc8ff1f1a4683842834bf283eb15c7545e27 Mon Sep 17 00:00:00 2001 From: Camille Chauvet Date: Thu, 1 Dec 2022 17:15:17 +0100 Subject: [PATCH] g vire le bit shift c mieu --- Makefile | 4 ++-- ft_get_bit_max.o | Bin 2624 -> 0 bytes ft_get_bit_min.o | Bin 2624 -> 0 bytes ft_is_sorted.c | 24 ++++++--------------- ft_is_sorted.o | Bin 3152 -> 2344 bytes ft_p.c | 8 +++---- ft_p.o | Bin 3528 -> 3568 bytes ft_r.c | 12 +++++------ ft_r.o | Bin 3200 -> 3248 bytes ft_radix.c | 14 ++++++------ ft_radix.o | Bin 3552 -> 3384 bytes ft_sort.c | 55 +++++++++++++++++++++-------------------------- ft_sort.o | Bin 4320 -> 4224 bytes ft_swap.c | 6 +++--- ft_swap.o | Bin 2256 -> 2264 bytes ft_tablen.c | 6 +++--- ft_tablen.o | Bin 2224 -> 2280 bytes push_swap | Bin 25848 -> 23480 bytes pushswap.h | 23 +++++++++----------- 19 files changed, 65 insertions(+), 87 deletions(-) delete mode 100644 ft_get_bit_max.o delete mode 100644 ft_get_bit_min.o diff --git a/Makefile b/Makefile index 193453d..8acf246 100644 --- a/Makefile +++ b/Makefile @@ -6,11 +6,11 @@ # By: cchauvet RW?MVMa0MUp^rZJC<o?}5v^e2R{+(WXd8;44c`?Lvm$&Yd$1V;G*y&!|4dGwA_Rh(N@o!?` zh{zT$+_ih{ZLMSX9^dWv`(1mtWAAnCy-fS})Q7)m)7sJ4j4)z}7mmcHwIm)zw~$Pl zs|StPspuQgV~5VooH+zw2+)~2Hv zkkTbhKzomn7WeRL=(jfpsEI0~->w8`nrw(l0ZI}A5qu(M0M>F%&u^yk6~`;4T5i2j zu6d~w^VXa-H~V@sFrN5)9?^oe2n9b|bp33u>}RXarj>`ZS7@Y5wW`}l=kq0}*>e5# z!hCw8*(f!xI2%d;lszAOCkJJ~aDe}`Hzf_v1z$Y#r64oyiCPZh|-@T!ftCd|qEV#+)(%w=Ji zMKS)1FwKI9n5V@=QzXnUgnnKeHcMj6{6U<0D2^?QqdQ{E5|iYN9C_+ri^^9X7gxCjPRyRlc9ZsJ4Wt( z_Kl#X*51RmAqmP2vC7N#pG2F1LyF9Vc#4sd-b+aGs0ItNEKs@q)GP z=94TN8RjV%cANDZyZ=vk1yY+0vEud`>)bQ&ZF~DW7Py@@W z`L1>L;@WJ(ck&;DRjIV9S!aD6Uy9;B_e$AwnQ%+lLfxslN_N;<7H&c>fYrEKCH+6i zkGM{_p5(Guxj42Z!CLLSmyst<)~9q|<;gusuvUA7>MLBg()~|PYL1CGYWlDEBn5Ji zHLa)SM5Z0Kf52KQ)tBl|<;eF8lb^{z)~fHj$dAhZIFl(3p#14d)%1jJm%J z*Pr~)bbs^~$au-$L{6Rsr$f2R`+q-V1{2lyI?|)||7gVi^wz5T(>rEd=+m=w1IJJ{ hIbQBZ`IAUIKmb4CM7=w*Eph#C6F{Lj>M?cyzX3iM8*%^u diff --git a/ft_get_bit_min.o b/ft_get_bit_min.o deleted file mode 100644 index c86a31b8f1651e0b04f6e6a83b5d369e7b5d5662..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2624 zcmb_c-ESL35TCpAUOwE|j)R~j2wCDQQk8QW5|M(N2GCKrDt#ylLPD);JLeB!pM!mN zQ&1to6vZ+~L`d*R9{R`&kAPIQqEh>Z1SysLP~MP;rvO3=hoE>7jL33090o9>Kn8FXM+gVNsDEqpPn8?7HFrW!D2Qn}af-JHUU6O-aL3{*2%J$wkmMV%qePk1_|8^ zycvmorN2F4>OZ0dz;{T6U9h z`WWUgh%{v0K`sP;_J?eN@wf;MZ5v!dhe!kljHr~44S2H5UcjB$5bO7liwENRcZ}Qz zY#TyNt-X(JL*kbkVwIQeKaP6_4kkx!oEMUxW&Cu2_sf~_vjLvYS!Vn^Yr64+ z|BCD5|G=MQUdFx5_>97T%y?DdsRv28mO!3EjZRVR`iR(^A70%I=y|&(zDs5^fH>8eW}U2Dt1NYDznR z<<>mMI&)!lw&7*-AAwb=w5plx+8RC;#Y5hevgr!pwe#p*Ax_q(G+*JxO-Zm;dnAf{ux_RKU!2q&6J$sK6`v$u zjPx`J-=@;8uEb3zJsIQ|a=0;1Y(;@+_MSBAu=w^of`N6t9kuc6w+aUdJ) fFXK`EBoYr0z%RH^?~eACxc+YwKp{WsF*W`paLXIS diff --git a/ft_is_sorted.c b/ft_is_sorted.c index 3a95650..4d9853b 100644 --- a/ft_is_sorted.c +++ b/ft_is_sorted.c @@ -6,34 +6,22 @@ /* By: cchauvet > shift != (prev >> shift) - 1) + if (tab[1] != 0) return (0); - prev = tab[i]; i++; } return (1); } - -int ft_is_sorted(int *in) -{ - return (ft_bit_finder_right(ft_get_bit_min(in), 1) == 31); -} diff --git a/ft_is_sorted.o b/ft_is_sorted.o index 31685225eae24c06137f05fd1e027e8bdce4eb22..19ec7e17e844ea29d0150549a46997b71d107d65 100644 GIT binary patch literal 2344 zcmb_d&2JM|5TCan4#BW?l75g(WqR4N~$sVWx}K@UiQNR*njy|Jy>YuCG* zrj-gvK-DNcfYf7;J#gqhQ1#GAJ-|Q00g(foI20+&tY?z-t2tC+q_;Eko6nt{XWuBD z|I$zjgcO{CJxx%6roAUGB;o?(&~vH0@ubNrKjcEh3!r2=RbFl$|oM? zZhy#zTk96&ZXZDHLFol~KYkM*o2BhrTWX`U{rGPTKns=MEWNn;kD5>)I8(OiwV-_q`;~D3Tu8pY;}Xeu{n3vot-%zC&pvf=TMt>KY^8~(h4hKw;%a+w+6*vB`h|(9X~AA zYE3U*^P}SYT(K92&G0*~H{=ejAcDxNLL7vxM&Q>A1hnA)H9&8H^u~aJ`r#s|^}ITK zU~J!A9ND{w(;=eCz~@f>C*zBQ8RIf~03IMv2qw(-k1wu%iK^A6%)@w|h$1M22FKPI7);$f!HB3n2B>%UJ7noCz={}D$ zuJ;da-LJ-tidU`n{WWkSe?0=X*6nnBTzWQ!Q6JpC-}YE<1uI=}gKp%zXTMsS2_vtz z3U0f-)~R^)I$q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p`HJV`^4Q z*Yn9#I*naQt!XnU)zIb)re-Rol4kX|bkRuWish_UOV*0{0ywQK-KbHDg^T4}1^Y%` zGm@B7f)1#bD~6^XduDo6H&U6Gm^w2vTS}&~S?J37j_jFYStCL#By+V?Npm)#4v=+v zusx|z3pQI-f2D-_f03VH7Uz2qlh*K2f&6AEd&Ki~3ifT}#QPGyNiuE;f^^7*gMgjy zPPhl@ah)Rq^OPWh^xX&E9<=rrZK!dST5kD^QL z2NqYQZ?feeV?@ycyo*(uOkuUE5b>PHaz_g`G>wj%Cmf?=Q z0CczYPt*Eh9b6y(72WICfb*PeS3q5W&z36Xi*vzz6!-c!fDh{Xu$y2IGc}npupDZzfM+OyPgQz`(%5G%*86F)#|fn9R;p#Kg`rxrC`yu{5tZ zGd(XgMIkebN%a@I3$n4HLU zobkhCO>T3p0yc<=0!)*$xXn15nIPOHlUH(^GpbL1$ZgLUI$4p&o-tx_B9LsDybwrU ZnEVh(o|vr2YtQ&#aw3qNFnJ-bIsh60&Vn==Ye=H#(wa%7%7kwt8B0*?lx$K*~Pd&Y>#CxPUF$(+3QK(jo7 PJlBLGX+QYif%g6eLs+LBzgDF=1Ov0cd-J?Vcl*2oXP#wQC&I3Ng`9{}PelzRl*H(wJ`6A0QHF3r# z@W#_tjwzVqZHB#;r3x=|ChC{ZiS*aI3u zii+NLb;JxQByYQ2WDH3jYKF}l91X1(KSqMSV3{_h;Fz{p(b~~dT$+-~_)wnbIPwX!F*)#gKI609yl2ycpmC0-JA!a2e4x!0UnYAbLv1l=-Znk9MXJo9M?8&Om$g;VR)t`|u zck)5D^vw?J9gK{{lTUKgGcru} 0 && !ft_is_sorted(tab_a)) + while (loop_index >= 0 && !ft_is_sorted(tab_a)) { - if (tab_a[tab_index] >> shift & 1) + if (tab_a[tab_index] % 2 == 1) { ft_pb(tab_a, tab_b); tab_index--; @@ -34,11 +32,11 @@ void ft_radix_sort(int *tab_a, int *tab_b) ft_ra(tab_a); loop_index--; } - while (tab_b[0] != -1) + while (tab_b[0] != STOP_VALUE) ft_pa(tab_a, tab_b); tab_index = ft_tablen(tab_a); while (--tab_index >= 0 && !ft_is_sorted(tab_a)) - tab_a[tab_index] = tab_a[tab_index] << 1; + tab_a[tab_index] = tab_a[tab_index] >> 1; } free(tab_a); free(tab_b); diff --git a/ft_radix.o b/ft_radix.o index 06bd29d27d3166e1e43f6158b148c51eaf37df40..084b841d4c4de9da57fbe185e892ad449728d15c 100644 GIT binary patch delta 971 zcmZ8fUr1A76u;-*`+ax!y5%zGb(Su}re;a=Ar+>!Vz2_KH)l~c^KXo4q@=0PNsZ|Wa?&Hwb}(aj&Q-z-)h%`Wo}Z*UnVAd1JtlZS$A1Ch7n62vQ_?ZOnZBr!40 z5h&%JEGB}6cX)2k8!@~x?g=E!6y=s88y_NLm(+~k#IB~v(7n;&(BQ!F(a?l25$Nyh zH}q&|U~o#{Sa57?yw7m4Q#y;|Qk{)YBzO*47sQJeDh-2KF$s2Dk=*bbQ&O$dMmtCq zT_R0Gq~AysB9tjsdd{ew;Sf!vg1m23%+MjL~bUSX_-@alj;t iS7N)R9)>Ys(N%wO0gAIMx`9cCz2bk2NgHlj9Df1s*89u= delta 1209 zcmZ8gO-NKx6u$Spci+4>GdcO!G+LR3JuQ%?AcH1M>cJ!#1r;ueNz2gzb%vTk2uU0Z z$1(G97X3g$oBj|f+O#RMP3a=22#PkQE=F>pD`yc*=iYfUNe9k3_dDNr&b@c;o7WYy zmE*N^)~ag?1SlcFRDUK-&=P5yG?!B5QqoKpipdXeQA30vX)gHRCHm83*qrx_S!3S1 z`4MyeDfQf7C|Nv?A(%2V!3!-*DP=g-vhX#Nn5Bsf@eEnhdupy{v)M(|aM5yNf7UZp zB0zs8n7Xnoc3Auc2CbrV)~L@vH)75eW^Y+LyKH!Bj^=ktmJKgH;gcVOMdS1~s8UVG zAf8#`TXExnp5ZI%ktM4yx4MZ5QS2X5B&%DX;uI!CT>_QZ=%PTS91+GNB&B#wq&H6D zZSA3U5hJ}9JNig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XU@s@<_tVFee3_FOc|D(N^rgr+<@LTht>gomQKh-^tAWR# za<*&x_5R$8`GGENzn)jU7TUgFiyUSb+x`WvAk!8o`MnI`Js6}^cP&3v;cJi*t1kbL zl0T&6s}-M4a{ad%1bP=<%j8@^wme>2kspUZ8(tH+_fi?aW5GZzZ`FbCz|KEU< zs{T5@w483o*C9(RT3(+c4X6dT<^u~~T3)CB39M5d3to${A}g@~+_juee*v6RUhkhO zl>BJrYlR;uo!WlA-VQ2xU5@6bvYgj%0T52H+axVd5A2YM?<-2-#Xcu? zB(HxI`G2|GlKV$J@F+F8Wz8Bz{_db9aL31#e}R(Et^fOK;HLeh^U~!z(;OCNKfKP8 z@~ZOZ0Ib4Kw}+lT#sR0>&XTb1CvLV # include # include +# define STOP_VALUE 4294967295 int ft_isnum(char *str); int ft_atoi(char *str); @@ -27,19 +28,15 @@ int ft_get_max_index(int *tab, int len); int ft_get_min_index(int *tab, int len); int ft_get_min_index(int *tab, int len); -int ft_tablen(int *tab); -int ft_is_sorted(int *in); +int ft_tablen(unsigned int *tab); +int ft_is_sorted(unsigned int *in); -int ft_bit_finder_left(int big, int tofind); -int ft_bit_finder_right(int big, int tofind); -int ft_get_bit_max(int *tab); -int ft_get_bit_min(int *tab); -void ft_radix_sort(int *tab_a, int *tab_b); +void ft_radix_sort(unsigned int *tab_a, unsigned int *tab_b); -void ft_swap(int *a, int *b); -void ft_pa(int *tab_a, int *tab_b); -void ft_pb(int *tab_a, int *tab_b); -void ft_ra(int *tab_a); -void ft_rb(int *tab_b); +void ft_swap(unsigned int *a, unsigned int *b); +void ft_pa(unsigned int *tab_a, unsigned int *tab_b); +void ft_pb(unsigned int *tab_a, unsigned int *tab_b); +void ft_ra(unsigned int *tab_a); +void ft_rb(unsigned int *tab_b); #endif