MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Using the Combinatorica Package in my own package

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119313] Using the Combinatorica Package in my own package
  • From: Karl Schulz <karlschulz at pwned.de>
  • Date: Mon, 30 May 2011 06:34:46 -0400 (EDT)

Hello all,

I am currently trying to create my first package in mathematica 8.0.

I tried the reference package from http://reference.wolfram.com/mathematica/tutorial/SettingUpMathematicaPackages.html, which worked without a problem.

In my own package, I would like to use the package combinatorica for the numbers of vertices of a graph V[G], since I would like to create multiple arrays with V[G] entries.

So I tried the following:
----------------------------
BeginPackage["karl`"]

Needs["Combinatorica`"] 

Begin["`Private`"]

karl[G_]:=Array[numberone, V[G]];
Array[numbertwo, V[G]];

End[ ]
----------------------------
Which gave me the following message:

Array::ilsmn: "Single or list of non-negative machine-sized integers expected at position 2 of Array[numbertwo,V[G]]. "
EndPackage[ ]

I then tried karl[G_Graph] to see if that fixed it, but the same error occurs.

Can someone see my error or suggest a fix? Thank you :-)

Many greetings,
Karl Schulz


  • Prev by Date: Re: Simple question: is it possible to take a derivative and solve for x ?
  • Next by Date: Export["...",...,"GIF"] results in nonreadable gif file
  • Previous by thread: Re: Can Mathematica construct a set of equations?
  • Next by thread: Re: Using the Combinatorica Package in my own package