Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #2822

Re: Using the Combinatorica Package in my own package

From "Nasser M. Abbasi" <nma@12000.org>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Using the Combinatorica Package in my own package
Date 2011-05-31 11:47 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <is2kh5$qpc$1@smc.vnet.net> (permalink)
References <irvrs1$8ij$1@smc.vnet.net>

Show all headers | View raw


On 5/30/2011 3:34 AM, Karl Schulz wrote:
> 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
>

In 8.0.1, I get this:

Needs["Combinatorica`"]

General::compat: Combinatorica Graph and Permutations functionality has
been superseded by preloaded functionaliy. The package now being
loaded may conflict with this. Please see the Compatibility Guide for details.

Do you this in 8.0?  w.r.t to your call, I do not understand it,
as I do not see what what these 'numberone', 'V' and 'G' came
from. Isn't some of these things supposed to be defined before
making the call?

--Nasser

Back to comp.soft-sys.math.mathematica | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Using the Combinatorica Package in my own package Karl Schulz <karlschulz@pwned.de> - 2011-05-30 10:34 +0000
  Re: Using the Combinatorica Package in my own package "Nasser M. Abbasi" <nma@12000.org> - 2011-05-31 11:47 +0000

csiph-web