Data update

This commit is contained in:
Ingy döt Net 2024-03-06 22:25:12 -08:00
parent ed705008a8
commit 0df55f9f24
2196 changed files with 32999 additions and 3075 deletions

View file

@ -14,16 +14,16 @@ extension algorithmOp
{
eval(i)
{
counter.append:1;
counter.append(1);
if (weak self.Length < n)
{
weak self.append:i
weak self.append(i)
}
else
{
if(randomGenerator.nextInt:counter < n)
{ weak self[randomGenerator.nextInt:n] := i }
if(randomGenerator.nextInt(counter) < n)
{ weak self[randomGenerator.nextInt(n)] := i }
};
^ weak self.Value
@ -34,19 +34,19 @@ extension algorithmOp
public program()
{
var bin := Array.allocate(10).populate:(n => new Integer());
for(int trial := 0, trial < 10000, trial += 1)
var bin := Array.allocate(10).populate::(n => new Integer());
for(int trial := 0; trial < 10000; trial += 1)
{
var s_of_n := 3.s_of_n();
for(int n := 0, n < 10, n += 1)
for(int n := 0; n < 10; n += 1)
{
var sample := s_of_n.eval:n;
var sample := s_of_n.eval(n);
if (n == 9)
{ sample.forEach:(i){ bin[i].append:1 } }
{ sample.forEach::(i){ bin[i].append(1) } }
}
};
console.printLine:bin.readChar()
console.printLine(bin).readChar()
}