www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Lack of `outer` keyword makes inner class dup implossible

reply S. <S._member pathlink.com> writes:
It seems that because inner classes lack an `outer` keyword it is impossible for
them to create a new instance for the purpose of COW when operators like opCom
are called...

sudoku.d(318): outer class Foobar 'this' needed to 'new' nested class BarBar
Jul 14 2006
next sibling parent reply BCS <BCS pathlink.com> writes:
S. wrote:
 It seems that because inner classes lack an `outer` keyword it is impossible
for
 them to create a new instance for the purpose of COW when operators like opCom
 are called...
 
 sudoku.d(318): outer class Foobar 'this' needed to 'new' nested class BarBar
 
 
sudoku.d as in the game? What does the program do? Is it a generator, a solver, or a player? I ask because I have a solver done and would be interested in comparing them.
Jul 14 2006
parent reply S. <user pathlink.com> writes:
On 2006-07-14 13:48:14 -0700, BCS <BCS pathlink.com> said:

 S. wrote:
 It seems that because inner classes lack an `outer` keyword it is 
 impossible for
 them to create a new instance for the purpose of COW when operators like opCom
 are called...
 
 sudoku.d(318): outer class Foobar 'this' needed to 'new' nested class BarBar
 
 
sudoku.d as in the game? What does the program do? Is it a generator, a solver, or a player? I ask because I have a solver done and would be interested in comparing them.
Yes, I'm fiddling around with an analytical solver. Mine currently doesn't solve as many as I would like. I only implemented three elimination methods so far. -S
Jul 14 2006
parent reply "Regan Heath" <regan netwin.co.nz> writes:
On Fri, 14 Jul 2006 17:47:51 -0700, S. <user pathlink.com> wrote:
 On 2006-07-14 13:48:14 -0700, BCS <BCS pathlink.com> said:

 S. wrote:
 It seems that because inner classes lack an `outer` keyword it is  
 impossible for
 them to create a new instance for the purpose of COW when operators  
 like opCom
 are called...
  sudoku.d(318): outer class Foobar 'this' needed to 'new' nested class  
 BarBar
sudoku.d as in the game? What does the program do? Is it a generator, a solver, or a player? I ask because I have a solver done and would be interested in comparing them.
Yes, I'm fiddling around with an analytical solver. Mine currently doesn't solve as many as I would like. I only implemented three elimination methods so far.
I wrote a sudoku solver too. It expects the puzzle in a CSV file, example attached. As far as I know it will solve anything which is 'logically solvable' .. in other words as long as there is always at least one definate next step with no 2+ choices and guessing involved. Regan
Jul 15 2006
next sibling parent reply BCS <BCS pathlink.com> writes:
Regan Heath wrote:
 On Fri, 14 Jul 2006 17:47:51 -0700, S. <user pathlink.com> wrote:
 
 On 2006-07-14 13:48:14 -0700, BCS <BCS pathlink.com> said:

 S. wrote:

 It seems that because inner classes lack an `outer` keyword it is  
 impossible for
 them to create a new instance for the purpose of COW when operators  
 like opCom
 are called...
  sudoku.d(318): outer class Foobar 'this' needed to 'new' nested 
 class  BarBar
sudoku.d as in the game? What does the program do? Is it a generator, a solver, or a player? I ask because I have a solver done and would be interested in comparing them.
Yes, I'm fiddling around with an analytical solver. Mine currently doesn't solve as many as I would like. I only implemented three elimination methods so far.
I wrote a sudoku solver too. It expects the puzzle in a CSV file, example attached. As far as I know it will solve anything which is 'logically solvable' .. in other words as long as there is always at least one definate next step with no 2+ choices and guessing involved. Regan
Mine goes the other direction, only set cells that have only one choice left, when you run out of those, store the state and guess. It uses a stack like system for the states. It was/is solving puzzles in about 2.75 ms. I think it will solve any puzzle that can be solved, and with a little modification, will check if more than one solution exists.
Jul 15 2006
parent reply S. <S._member pathlink.com> writes:
In article <e9c20f$271c$1 digitaldaemon.com>, BCS says...
Regan Heath wrote:
 On Fri, 14 Jul 2006 17:47:51 -0700, S. <user pathlink.com> wrote:
 
 On 2006-07-14 13:48:14 -0700, BCS <BCS pathlink.com> said:

 S. wrote:

 It seems that because inner classes lack an `outer` keyword it is  
 impossible for
 them to create a new instance for the purpose of COW when operators  
 like opCom
 are called...
  sudoku.d(318): outer class Foobar 'this' needed to 'new' nested 
 class  BarBar
sudoku.d as in the game? What does the program do? Is it a generator, a solver, or a player? I ask because I have a solver done and would be interested in comparing them.
Yes, I'm fiddling around with an analytical solver. Mine currently doesn't solve as many as I would like. I only implemented three elimination methods so far.
I wrote a sudoku solver too. It expects the puzzle in a CSV file, example attached. As far as I know it will solve anything which is 'logically solvable' .. in other words as long as there is always at least one definate next step with no 2+ choices and guessing involved. Regan
Mine goes the other direction, only set cells that have only one choice left, when you run out of those, store the state and guess. It uses a stack like system for the states. It was/is solving puzzles in about 2.75 ms. I think it will solve any puzzle that can be solved, and with a little modification, will check if more than one solution exists.
Where's the code? -SC
Jul 17 2006
parent reply BCS <BCS pathlink.com> writes:
S. wrote:
 In article <e9c20f$271c$1 digitaldaemon.com>, BCS says...
 
Mine goes the other direction, only set cells that have only one choice 
left, when you run out of those, store the state and guess. It uses a 
stack like system for the states. It was/is solving puzzles in about 
2.75 ms. I think it will solve any puzzle that can be solved, and with a 
little modification, will check if more than one solution exists.
Where's the code? -SC
Jul 17 2006
parent S. <S._member pathlink.com> writes:
In article <e9gh4g$gh$11 digitaldaemon.com>, BCS says...
This is a multi-part message in MIME format.
--------------010201050909040002030603
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

S. wrote:
 In article <e9c20f$271c$1 digitaldaemon.com>, BCS says...
 
Mine goes the other direction, only set cells that have only one choice 
left, when you run out of those, store the state and guess. It uses a 
stack like system for the states. It was/is solving puzzles in about 
2.75 ms. I think it will solve any puzzle that can be solved, and with a 
little modification, will check if more than one solution exists.
Where's the code? -SC
Very interesting, here's mine. I'm almost embarrased, it's much more complicated than either of your guys'. I've still got alot of work to do on it though. begin 0644 sudoku.d M:6UP;W)T('-T9"YS=&1I;SL-"FEM<&]R="!S=&0N9FEL93L-"FEM<&]R="!S M=&0N<W1R:6YG.PT*:6UP;W)T('-T9"YM871H.PT*:6UP;W)T('-T9"YC='EP M86UE.R!A<F=S6S$N+B1=*0T*("` ('L-"B` ("` ('1R>0T*"7L-" D (&-H M87);75M=('5N<V]L=F5D1W)I9', /2!S<&QI=&QI;F5S*&-A<W0H8VAA<EM= M*7)E860H9FEL96YA;64I*3L-" D (`T*"2` 9F]R96%C:" =6EN="!G<FED M96-T(#T 8W5R0F]A<F0N4V]L=F4H*3L-" D)8VAA<EM=('-O;'9E9"`](&-U M>PT*"0D ("` =W)I=&5F*"(E<RTE+C`U9#I<;EQN(BQF:6QE;F%M92P 9W)I M9$YU;2LQ*3L-" D)("` (`T*"0D ("` =6EN="!I;F, /2!C87-T*'5I;G0I M"0EW<FET969L;B (B5S7'0E<R(L('5N<V]L=F5D6VDN+FDK:6YC72P <V]L M7&XB*3L-" D)("` ("` ?0T*"0D ('T-" D)96QS90T*"0D ('L-" D)("` M"2` ?0T*"2` ("` ('T-" D ("` ("!C871C:" 4W5D;VMU17AC97!T:6]N M=&-H*$9I;&5%>&-E<'1I;VX 92D >PT*"7=R:71E9FQN*")%<G)O<B!R96%D M:6YG(&9I;&4 )7,B+"!E+G1O4W1R:6YG*"DI.PT*("` ("` ?0T*("` ('T- M9"!T;W1A;"P )60 8V]R<F5C="P )60 97)R;W)S+"`E9"!F86EL960B+"!T M;W1A;"P 8V]R<F5C="P 97)R;W)S+"!F86EL960I.PT*("`-"B` <F5T=7)N M+R\O+R\O+R\O+R\O+R\O+R\O+PT*+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O M+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\-"B\O+R\O+R\O+R\O M+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O M+R\O+R\O+R\O+R\O+PT*+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O M+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\-"F-L87-S(%-U9&]K=45X8V5P M+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O M+R\O+PT*+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O M+R\O+R\O+R\O+R\O+R\O+R\-"B\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O M<VED95-I>F4 /2!C87-T*'5I;G0I<&]W*"!C87-T*')E86PI<W%U87)E4VEZ M<PT*("` ($-E;&QS+FQE;F=T:"`](&)O87)D4VEZ93L-"B` ("!F;W(H('5I M;G0 :3TP.R!I/$-E;&QS+FQE;F=T:#L M($-E;&Q&<FEE;F1S.PT*"4-E;&Q&<FEE;F1S6T-E;&PN4F]W72`](&YE=R!2 M*&DI.PT*"6-U<D-E;&PN1G)I96YD<R`]($-E;&Q&<FEE;F1S.PT*("` ("` M96YG=& I(&)R96%K.PT*"0T*"6EF*"!I<V1I9VET*"!C("D )B8 8R`A/2`G M('T-" EE;'-E(&EF(" :7-A;'!H82 8R`I("D-" D ('L-" D ("` 0V5L M;'-;:5TN5F%L=64 /2!S=&0N8W1Y<&4N=&]U<'!E<BAC*2`M("=!)R`K(#D[ M72!A<G)3=&]R86=E(#T ;F5W('5B>71E6V-A<W0H=6EN="EC96EL*'-I9&53 M:7IE+S I73L-"B` ("!":71!<G)A>2!P;W-S:6)L93L-"B` ("!P;W-S:6)L M;$-E;&QS(#T ;F5W($-E;&Q3970H*3L-" T*("` ("\O2V5E<"!T<GEI;F< M=6YT:6P =V4 8V%N)W0 9FEG=7)E(&]U="!A;GD <&]S<VEB:6QI=&EE<R!T M<VXG="!P;W-S:6)L92!I;B!A;GD ;V8 =&AE('5N:71S('1H:7, :61X(&)E M4V5T('-E=#L M:6)L92!>/2!P;W-S:6)L93L-" D)("` (&9O<F5A8V H('5I;G0 :3L <V5T M("D-" D)("` ("` >PT*"0D):68 *"!I("$](&ED>"`I('!O<W-I8FQE('P] M(#T 8W5R0V5L;"Y0;W-S:6)L945L<V5W:&5R92 <&]S<VEB;&4 *3L-" D) M" D)+R])9B!S;VUE=&AI;F< 8V%N)W0 8F4 :6X =&AE(&]T:&5R(')O=W,L M(&]R(&-O;'5M;G,L(&]F('1H92!C=7)R96YT('-Q=6%R90T*"0DO+U1H96X M:70 8V%N)W0 8F4 :6X =&AI<R!R;W< ;W( 8V]L=6UN(&]F(&]T:&5R('-Q M;F]T*"D[("\O179E<GET:&EN9R!%;'-E(`T*"0D ("` <F5L0V5L;',N86YD M*"!S<75A<F4 *3L +R]7:&%T)W, :6X =&AE('-Q=6%R92!O9B!E=F5R>71H M;&QS("D-" D)("` ("` >PT*"0D)<&]S<VEB;&4 ?#T 0V5L;'-;:5TN4&]S M;W-S:6)L92!E;'-E=VAE<F4 :&%S('1O(&)E(&EN('1H:7, <F]W(&]F('1H M:7, <W%U87)E(0T*"0D ("` +R]792!C86X 96QI;6EN871E('1H96T 9G)O M;2!P;W-S:6)I;&ET:65S(&5L<V5W:&5R92$-" D)("` (')E;$-E;&QS+F-L M=6%R90T*"0D ("` <F5L0V5L;',N;F]T*"D[("\O5VAA=', ;F]T(&EN('1H M92!S<75A<F4-" D)("` (')E;$-E;&QS+F%N9" <V5T("D[("\O(%=H870G M<R!N;W0 :6X =&AE('-Q=6%R92!!3D0 :7, :6X =&AE(&-O;'5M;CL-" D) M("`-" D)("` ("\O1V5T('1H92!P;W-S:6)I;&ET:65S(&]F('1H870 9G)A M8W1I;VX ;V8 =&AE('-Q=6%R90T*"0D ("` 9F]R96%C:" =6EN="!I.R!R M3&EM:710;W-S:6)L92 <&]S<VEB;&4 *3L-" D)("` ("` ?0T*"0D ("` M:68H8VAA;F=E9"D 8G)E86L 4F5S=&%R=$-H96-K.PT*"0D ('T-" D ("` M=&5;72!Z97)O4W1O<F%G92`](&YE=R!U8GET95MC87-T*'5I;G0I8V5I;"AS M:6YV86QI9"!G<FED(&%D9"!T;R!T:&4 8V]R<F5C="!N=6UB97( :6X 979E M87)E4VEZ92`J('-Q=6%R95-I>F4 *R!C;VPO<W%U87)E4VEZ93L +R\ 66%Y M8V]L<UMC;VQ=("L](&-U<BY686QU93L-" ES<7)S6W-Q<ET *ST 8W5R+E9A M*B`H<VED95-I>F4 *R`Q("DI("\ ,CL-"B` ("`-"B` ("!F;W(H(&EN="!I M(#T ,#L :2`\('-I9&53:7IE.R!I*RL *0T*("` ("` :68 *"!R;W=S6VE= M("$](&5X<&5C="!\?"!C;VQS6VE=("$](&5X<&5C="!\?"!S<7)S6VE=("$] M8VEI*"D-"B` >PT*("` (&-H87);72!A<V-I:3L-"B` ("!A<V-I:2YL96YG M5F%L=64 /R`H(&-U<BY686QU92`^(#D /R!C=7(N5F%L=64 *R`G02< .B!C M=7(N5F%L=64 *R`G,"<I(#H )RTG.PT*("` ("` ?0T*("` (')E='5R;B!A M("\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O M>PT*("` (&5N=6T >PT*("` ("` 4F]W+`T*("` ("` 0V]L=6UN+`T*("` M("` 0FET07)R87D 7U!O<W-I8FQE.PT*("` ('5I;G0 7U9A;'5E(#T ,#L- M<W0H=6EN="EC96EL*'-I9&53:7IE+S N,"E=.PT*("` ("` 7U!O<W-I8FQE M("!?1G)I96YD<UMI72`](&9R:65N9%-E=#L- M0V5L;%-E=%M=($9R:65N9',H*0T*("` ('L-"B` ("` (')E='5R;B!?1G)I M;VP 4&]S<VEB;&5%;'-E=VAE<F4H:6YO=70 0FET07)R87D <V]M95=H97)E M*0T*("` ('L-"B` ("` ($)I=$%R<F%Y(&YO=%!O<W-I8FQE(#T ?G-O;657 M>59A;'5E*"!N;W10;W-S:6)L92P 9F%L<V4 *3L-"B` ("` (&EF*'9A;"`^ M"B` ("` (`T*("` ("` :68H('1E;7` (3T 7U!O<W-I8FQE*0T*"7L-" D M;W)T('9A;'5E*0T*("` ('L-"B` ("` (&EF*"`A('9A;'5E("D <F5T=7)N M.PT*("` ("` 7U!O<W-I8FQE6W9A;'5E+3%=(#T =')U93L-"B` ("` (%]6 M;$9R:65N9',H*0T*("` ("\O5VAE;B!P;W1E;G1I86QS(&%R92!E;&EM:6YA M=&5D(&ES4V5T(&-H96-K<R!T;R!S964 :68 =V4 :&%V92!A('9A;'5E+ T* M("` ("\O268 =V4 9&\ =&AE;B!686QU92!I<R!C86QL960 =&\ <V5T('1H M<RP 86YD('=E('5P9&%T92!O=7( 9G)I96YD<R!A<R!T;R!O=7( <W1A='5S M(#T ;W5T97(N;F5W($-E;&Q3970H*3L-"B` ("` (')E;$-E;&QS+F-L96%R M=&EE<R!F<F]M($9R:65N9',A+ T*("` ("` 9F]R96%C:" =6EN="!I.R!R M07)R87E686QU92 :6YO=70 0FET07)R87D 87)R+"!B;V]L(&5N<W5R95!O M<W-I8FQE(#T M:68 *"!X("D-" D ("` >PT*"2` ("` ('9A;"`](&DK,3L-" D ("` ?0T* M"7T-"B` ("`-"B` ("` (&EF*"!E;G-U<F50;W-S:6)L92`I(&EF*"`A=F%L M("D =&AR;W< ;F5W(%-U9&]K=45X8V5P=&EO;B (E-O;65T:&EN9R!W96YT M970H*0T*("` ('L-"B` ("` (&EF*"!?5F%L=64 *2!R971U<FX =')U93L M("` ("!686QU92`]($%R<F%Y5F%L=64H7U!O<W-I8FQE*3L-"B` ("`-"B` M<FYS('1R=64 :68 96QI;6EN871I;F< =&AI<R!P;W-S:6)L:71Y('-E="!T M:&4 =F%L=64-"B` ("!B;V]L($5L:6UI;F%T959A;'5E*&EN="!V86QU92D- M('=E(&=O="!I="$-" D (')E='5R;B!T<G5E.PT*"7T-"B` ("`-"B` ("` M+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O M+R\O+PT*("`O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O M+R\O+R\O+R\O+R\O+R\O+R\O+PT*("`O+R\O+R\O+R\O+R\O+R\O+R\O+R\O M+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+PT*("`O+R\O+R\O M+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O M6V-A<W0H=6EN="EC96EL*&)O87)D4VEZ92\X+C`I73L-"B` ("` (&-E;&Q3 M($-E;&Q3970 83( *0T*("` ('L-"B` ("` (&-E;&Q3970 )CT 83(N8V5L M;%-E=#L- M" T*("` (&EN="!O<$%P<&QY*"!I;G0 9&5L96=A=&4 *&EN;W5T('5I;G0I M<F5T(#T 9&<H(&D *2D (3T ,"`I(&)R96%K.PT*"7T-"B` ("` (')E='5R M+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O M("` ("` <W5P97(H*3L-"B` ("` (`T*("` ("` =6EN="!I;FET4F]W(#T M*&ED>"`O('-I9&53:7IE*2`J('-I9&53:7IE.R`O+UEA>2!F;W( :6YT96=E M(#T M+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O M87-S($-O;'5M;B`Z($-E;&Q3970-"B` >PT*("` ('1H:7,H=6EN="!I9' I M"B` ("` (&9O<B =6EN="!J(#T 8V]L.R!J(#P 0V5L;',N;&5N9W1H.R!J M("\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O+R\O M("` <W5P97(H*3L-"B` ("` (`T*("` ("` =6EN="!S=&%R=$ED>"`](&ED M>#L-"B` ("` ('-T87)T261X(#T *" H<W1A<G1)9' +R!S:61E4VEZ92`I M("`O*B!.=6UB97( ;V8 <F]W<R`J+PT*"0D ("`O('-Q=6%R95-I>F4 *2` M("` ("` ("` +RH :6YT96=R86P <W%U87)E<R`J+PT*"0D ("H <VED95-I M>F4 *B!S<75A<F53:7IE("D[("\J375L=&EP;'D :70 8F%C:R!U<"!T;R!T M:&4 9FER<W0 8V5L;"!I;B!T:&4 <F]W(&]F('1H92!S<75A<F4 *B\-"B` M("` (`T*("` ("` <W1A<G1)9' *ST *"AI9' )2!S:61E4VEZ92D +R!S M<75A<F53:7IE*2`J('-Q=6%R95-I>F4[("\J($%D9"!T:&4 8F%S92!C;VQU M="!I(#T ,#L M("` 8V5L;%-E=%L <W1A<G1)9' *R`H:2`J('-I9&53:7IE*2`K(&H 72`] ` end
Jul 17 2006
prev sibling next sibling parent S. Chancellor <dnewsgr mephit.kicks-ass.org> writes:
On 2006-07-15 02:52:42 -0700, "Regan Heath" <regan netwin.co.nz> said:

 ------------IvETWbTDu3bk1hw3mOmW4b
 Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15
 Content-Transfer-Encoding: 8bit
 
 On Fri, 14 Jul 2006 17:47:51 -0700, S. <user pathlink.com> wrote:
 On 2006-07-14 13:48:14 -0700, BCS <BCS pathlink.com> said:
 
 S. wrote:
 It seems that because inner classes lack an `outer` keyword it is  
 impossible for
 them to create a new instance for the purpose of COW when operators  like opCom
 are called...
 sudoku.d(318): outer class Foobar 'this' needed to 'new' nested class  BarBar
 
sudoku.d as in the game? What does the program do? Is it a generator, a solver, or a player? I ask because I have a solver done and would be interested in comparing them.
Yes, I'm fiddling around with an analytical solver. Mine currently doesn't solve as many as I would like. I only implemented three elimination methods so far.
I wrote a sudoku solver too. It expects the puzzle in a CSV file, example attached. As far as I know it will solve anything which is 'logically solvable' .. in other words as long as there is always at least one definate next step with no 2+ choices and guessing involved.
I peaked at your code. From a brief look it doesn't seem that it handles several more advanced analytical techniques. For example if all the posibilities for a number within a box reside on the same row or column, then it is required that the other boxes that contain that column not have it within the column. Etc, There are some really advanced ones like X-Wing etc. I don't fully understand those techniques yet though. I'll post my current code here monday or so. I broke it while implementing constraint propagation for fun.
Jul 16 2006
prev sibling parent S. <S._member pathlink.com> writes:
In article <optcp5p4fx23k2f5 nrage>, Regan Heath says...
------------IvETWbTDu3bk1hw3mOmW4b
Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15
Content-Transfer-Encoding: 8bit

On Fri, 14 Jul 2006 17:47:51 -0700, S. <user pathlink.com> wrote:
 On 2006-07-14 13:48:14 -0700, BCS <BCS pathlink.com> said:

 S. wrote:
 It seems that because inner classes lack an `outer` keyword it is  
 impossible for
 them to create a new instance for the purpose of COW when operators  
 like opCom
 are called...
  sudoku.d(318): outer class Foobar 'this' needed to 'new' nested class  
 BarBar
sudoku.d as in the game? What does the program do? Is it a generator, a solver, or a player? I ask because I have a solver done and would be interested in comparing them.
Yes, I'm fiddling around with an analytical solver. Mine currently doesn't solve as many as I would like. I only implemented three elimination methods so far.
I wrote a sudoku solver too. It expects the puzzle in a CSV file, example attached. As far as I know it will solve anything which is 'logically solvable' .. in other words as long as there is always at least one definate next step with no 2+ choices and guessing involved. Regan
Wow, your code is kind of tricky. It'll take me a bit to understand all of it. I'll post mine here in a bit. It's ALOT longer though =/ Mine should handle larger grids though, I haven't gotten my hands on any data for 16x16 or whatever yet though.
Jul 17 2006
prev sibling parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"S." <S._member pathlink.com> wrote in message 
news:e98u9d$oqh$1 digitaldaemon.com...
 It seems that because inner classes lack an `outer` keyword it is 
 impossible for
 them to create a new instance for the purpose of COW when operators like 
 opCom
 are called...
It's irritating, isn't it? The workaround is to make the ctor for the inner class take a reference to its owning outer class, then you can use the syntax Inner dup() { Inner n = outerThis.new Inner(outerThis); return n; } That is, you can 'new' the inner class using the outerThis reference. I suppose another way would be to do some terribly ugly, nonportable hacks to _find_ the outer pointer manually. Maybe if we do that, Walter will see that having an 'outer' reference would be useful.
Jul 14 2006
next sibling parent =?ISO-8859-1?Q?Jari-Matti_M=E4kel=E4?= <jmjmak utu.fi.invalid> writes:
Jarrett Billingsley wrote:
 "S." <S._member pathlink.com> wrote in message 
 news:e98u9d$oqh$1 digitaldaemon.com...
 It seems that because inner classes lack an `outer` keyword it is 
 impossible for
 them to create a new instance for the purpose of COW when operators like 
 opCom
 are called...
It's irritating, isn't it? The workaround is to make the ctor for the inner class take a reference to its owning outer class, then you can use the syntax Inner dup() { Inner n = outerThis.new Inner(outerThis); return n; } That is, you can 'new' the inner class using the outerThis reference. I suppose another way would be to do some terribly ugly, nonportable hacks to _find_ the outer pointer manually. Maybe if we do that, Walter will see that having an 'outer' reference would be useful.
Implementation of the inner class always stores the context pointer of the outer class. It could be possible to instantiate yet another inner class by implicitly providing the context pointer of the current outer class to the new inner classes when 'new' is used without a prefix. Again, that's how Java does it. -- Jari-Matti
Jul 14 2006
prev sibling parent reply S. <user pathlink.com> writes:
On 2006-07-14 14:06:35 -0700, "Jarrett Billingsley" <kb3ctd2 yahoo.com> said:

 "S." <S._member pathlink.com> wrote in message 
 news:e98u9d$oqh$1 digitaldaemon.com...
 It seems that because inner classes lack an `outer` keyword it is 
 impossible for
 them to create a new instance for the purpose of COW when operators like opCom
 are called...
It's irritating, isn't it? The workaround is to make the ctor for the inner class take a reference to its owning outer class, then you can use the syntax Inner dup() { Inner n = outerThis.new Inner(outerThis); return n; } That is, you can 'new' the inner class using the outerThis reference. I suppose another way would be to do some terribly ugly, nonportable hacks to _find_ the outer pointer manually. Maybe if we do that, Walter will see that having an 'outer' reference would be useful.
Yes, I thought of that. But Alas, WTF IS THE POINT OF INNER CLASSES IMPLICITLY HAVING THE THING THEN!?!?!?!?!??!!? -S
Jul 14 2006
parent reply Bruno Medeiros <brunodomedeirosATgmail SPAM.com> writes:
S. wrote:
 On 2006-07-14 14:06:35 -0700, "Jarrett Billingsley" <kb3ctd2 yahoo.com> 
 said:
 
 "S." <S._member pathlink.com> wrote in message 
 news:e98u9d$oqh$1 digitaldaemon.com...
 It seems that because inner classes lack an `outer` keyword it is 
 impossible for
 them to create a new instance for the purpose of COW when operators 
 like opCom
 are called...
It's irritating, isn't it? The workaround is to make the ctor for the inner class take a reference to its owning outer class, then you can use the syntax Inner dup() { Inner n = outerThis.new Inner(outerThis); return n; } That is, you can 'new' the inner class using the outerThis reference. I suppose another way would be to do some terribly ugly, nonportable hacks to _find_ the outer pointer manually. Maybe if we do that, Walter will see that having an 'outer' reference would be useful.
Yes, I thought of that. But Alas, WTF IS THE POINT OF INNER CLASSES IMPLICITLY HAVING THE THING THEN!?!?!?!?!??!!? -S
I believe he mentioned that as just a "workaround", a temporary solution, not a final one! -- Bruno Medeiros - CS/E student http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
Jul 16 2006
parent S. Chancellor <dnewsgr mephit.kicks-ass.org> writes:
On 2006-07-16 06:42:32 -0700, Bruno Medeiros 
<brunodomedeirosATgmail SPAM.com> said:

 S. wrote:
 On 2006-07-14 14:06:35 -0700, "Jarrett Billingsley" <kb3ctd2 yahoo.com> said:
 
 "S." <S._member pathlink.com> wrote in message 
 news:e98u9d$oqh$1 digitaldaemon.com...
 It seems that because inner classes lack an `outer` keyword it is 
 impossible for
 them to create a new instance for the purpose of COW when operators like opCom
 are called...
It's irritating, isn't it? The workaround is to make the ctor for the inner class take a reference to its owning outer class, then you can use the syntax Inner dup() { Inner n = outerThis.new Inner(outerThis); return n; } That is, you can 'new' the inner class using the outerThis reference. I suppose another way would be to do some terribly ugly, nonportable hacks to _find_ the outer pointer manually. Maybe if we do that, Walter will see that having an 'outer' reference would be useful.
Yes, I thought of that. But Alas, WTF IS THE POINT OF INNER CLASSES IMPLICITLY HAVING THE THING THEN!?!?!?!?!??!!? -S
I believe he mentioned that as just a "workaround", a temporary solution, not a final one!
Hehe, I was just venting my frustration :) His solution seems to generate syntax errors when I tried it anyways though =/ -S.
Jul 16 2006