Skip to content

Scoping of private variable in CombinatoricaV201 Tableaux #1731

@rocky

Description

@rocky

Description

I am seeing an undefined local variable inside from Combinatorica V2.1 running Tableaux.

How to Reproduce and Output Given

In[1]:= Needs["DiscreteMath`CombinatoricaV201`"]

In[2]:= LoadModule["pymathics.trepan"]
Out[2]= "pymathics.trepan"

In[3]:= TraceEvaluation[Tableaux[{1}]]
Image

Additional context

I have not been able to narrow this down to a smaller expression. At one point I thought I had narrowed it to
a problem with TransposePartition, but the following works:

TransposePartition[p_List] :=
	Block[{s=Select[p,(#>0)&], i, row, r},
		row = Length[s];
		Table [
			r = row;
			While [s[[row]]<=i, row--];
			r,
			{i,First[s]}
		]
	]
TransposePartition[{1}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions