mroughan / LinePicking

Numerical code for geometric probability problems, in particular density functions for the "line picking" problem.
0 stars 1 forks source link

Default values not working (yes they do) #30

Closed jonotuke closed 12 years ago

jonotuke commented 12 years ago

Hi Eric.

If I check the info for problem 2 I get the following

> LinePickingProblemLookup(problem=2,print=F)
$name
[1] "disk"

$description
[1] "disk, with radius parameters[0]"

$npar
[1] 1

$parameters
$parameters[[1]]
[1] 1

but if I then check problem 2 with its default value it does not except it

> LinePickingCheckParameters(problem=2,parameters=1)
LinePickingCheckParameters: problem 2 requires 2 parameters (1 were input). 
[1] 3

Any ideas?

lamestllama commented 12 years ago

I can look

On 09/09/2012, at 7:46 PM, jonotuke wrote:

Hi Eric.

If I check the info for problem 2 I get the following

LinePickingProblemLookup(problem=2,print=F) $name [1] "disk"

$description [1] "disk, with radius parameters[0]"

$npar [1] 1

$parameters $parameters[[1]] [1] 1

but if I then check problem 2 with its default value it does not except it

LinePickingCheckParameters(problem=2,parameters=1) LinePickingCheckParameters: problem 2 requires 2 parameters (1 were input). [1] 3

Any ideas?

— Reply to this email directly or view it on GitHub.

lamestllama commented 12 years ago

Problem 2 is the hyper ball problem 1 is the disk problem 0 is the square

the hyper ball does indeed take 2 parameters

You have an indexing issue somewhere

On 09/09/2012, at 7:46 PM, jonotuke wrote:

Hi Eric.

If I check the info for problem 2 I get the following

LinePickingProblemLookup(problem=2,print=F) $name [1] "disk"

$description [1] "disk, with radius parameters[0]"

$npar [1] 1

$parameters $parameters[[1]] [1] 1

but if I then check problem 2 with its default value it does not except it

LinePickingCheckParameters(problem=2,parameters=1) LinePickingCheckParameters: problem 2 requires 2 parameters (1 were input). [1] 3

Any ideas?

— Reply to this email directly or view it on GitHub.

lamestllama commented 12 years ago

Jono look closely at the following output I ask for problem zero but get told problem zero isn't valid then lied to about the valid problem numbers there are 13 problems atm starting at 0 so 13 is not a valid problem number.

LinePickingProblemLookup(0) Error in LinePickingProblemLookup(0) : That problem does not exist, there are only problems 0 - 13

lamestllama commented 12 years ago

Jono the fault was all yours. I fixed your code and pushed it back.