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


Groups > comp.soft-sys.math.mathematica > #15394 > unrolled thread

basic namespace question, and access to BinarySearch

Started byAlan <alan.isaac@gmail.com>
First post2013-09-10 07:23 +0000
Last post2013-09-10 07:23 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  basic namespace question, and access to BinarySearch Alan <alan.isaac@gmail.com> - 2013-09-10 07:23 +0000

#15394 — basic namespace question, and access to BinarySearch

FromAlan <alan.isaac@gmail.com>
Date2013-09-10 07:23 +0000
Subjectbasic namespace question, and access to BinarySearch
Message-ID<l0mhe8$ld8$1@smc.vnet.net>
What is the proper way to get access to a package without adding that
package to $ContextPath?  If I use Needs, the package name is added to
$ContextPath.  (Of course I can remove items from $ContextPath.)

Motivations: 1. I would like a cleaner namespace, and I don't mind using
long names.  2. I would like to avoid the following warning when I want
access just to Combinatorica`BinarySearch.

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

Follow-up questions:

1. Mathematiaca documentation currently suggests loading Combinatorica to get BinarySearch:
http://reference.wolfram.com/mathematica/Combinatorica/ref/BinarySearch.html
However if one does so, the above warning is given.  It seems to me that 
this arrangement is buggy.  Is it?

2. I am surprised that BinarySearch is not in the Global context.
Am I overlooking similar functionality under another name?
The functionality I seek is the insertion point into a sorted
list that would maintain insertion order, ideally with left/right
option for when the inserted item matches a list item.
(See Pythons binary_search, for example.)

3. I see that a BinarySearch function is in the GeometricFunctions package,
which in turn is available by default.  But I cannot find any related
documentation.  What do I make of this arrangement?

Thank you,
Alan Isaac

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web