Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,41 @@
|
|||
Define.f ref=49.0, mea
|
||||
NewList argV.f()
|
||||
|
||||
Macro put
|
||||
Print(~"\n["+StrF(ref)+"]"+#TAB$)
|
||||
ForEach argV() : Print(StrF(argV())+#TAB$) : Next
|
||||
PrintN(~"\nAverage Error : "+StrF(vari(argV(),ref),5))
|
||||
PrintN("Crowd Error : "+StrF((ref-mea)*(ref-mea),5))
|
||||
PrintN("Diversity : "+StrF(vari(argV(),mea),5))
|
||||
EndMacro
|
||||
|
||||
Macro LetArgV(v)
|
||||
AddElement(argV()) : argV()=v
|
||||
EndMacro
|
||||
|
||||
Procedure.f mean(List x.f())
|
||||
Define.f m
|
||||
ForEach x() : m+x() : Next
|
||||
ProcedureReturn m/ListSize(x())
|
||||
EndProcedure
|
||||
|
||||
Procedure.f vari(List x.f(),r.f)
|
||||
NewList nx.f()
|
||||
ForEach x() : AddElement(nx()) : nx()=(r-x())*(r-x()) : Next
|
||||
ProcedureReturn mean(nx())
|
||||
EndProcedure
|
||||
|
||||
If OpenConsole()=0 : End 1 : EndIf
|
||||
Gosub SetA : ClearList(argV())
|
||||
Gosub SetB : Input()
|
||||
End
|
||||
|
||||
SetA:
|
||||
LetArgV(48.0) : LetArgV(47.0) : LetArgV(51.0)
|
||||
mea=mean(argV()) : put
|
||||
Return
|
||||
|
||||
SetB:
|
||||
LetArgV(48.0) : LetArgV(47.0) : LetArgV(51.0) : LetArgV(42.0)
|
||||
mea=mean(argV()) : put
|
||||
Return
|
||||
Loading…
Add table
Add a link
Reference in a new issue