Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: question about changing my data structure

Author: Richard Pijl

Date: 02:36:32 07/17/03

Go up one level in this thread


On July 17, 2003 at 05:06:16, Uri Blass wrote:

>Note that the name of the arrays that I have is different but I replaced the
>names to make it easy to understand the problem.
>
>I have an array A[64][8]
>
>I want to replace it by 8 arrays A0[64],A1[64],...A7[64] when A[i][j]=Aj[i]
>
>What is the best way to do it?
>
>I already added the arrays A0...A7 except the fact that I have different names.
>Today movei update both A0...A7 and A.
>
>I do not want to update A but to use Aj[i] that always has the same value as
>A[i][j].
>
>There are cases when I call directly A3[square] and it should be faster then
>calling A[square][3] but there cases when I call Aj[square] when j is not the
>same every time.
>
>I can do it by switch command but the question is if this is the right way to go
>or if there is a faster way.
>
>I thought that it may be possible to have some union when A0,A1,....A7 means the
>same as A but I do not see exactly how to do it.
>
>Uri



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.