MathGroup Archive 2010

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

Search the Archive

Re: Where is the code for DistanceMatrix?

  • To: mathgroup at
  • Subject: [mg109222] Re: Where is the code for DistanceMatrix?
  • From: David Reiss <dbreiss at>
  • Date: Sat, 17 Apr 2010 06:06:14 -0400 (EDT)
  • References: <hq9c1b$qea$>

It seems that the HierarchicalClustering` Package is actually
installed at startup time but the usage messages --and some portion of
its functionality -- are not loaded until you do a

So if you start up Mathematica fresh and do not load
HierarchicalClustering` but check


you sill see that HierarchicalClustering` is one of the contexts.  You
can call DistanceMatrix explicitly at that time using the full context


for example. So presumably this portion of the HierarchicalClustering`
code is either compiled C code in Mathematica but placed int eh
HierarchicalClustering` context, or is loaded as a .mx file
somewhere...  but I hven't found a corresponding .mx file....


On Apr 16, 5:52 am, "Ingolf Dahl" <ingolf.d... at> wrote:
> DistanceMatrix is defined in the HierarchicalClustering package and in th=
> HierarchicalClustering` context. But if I open  in the
> HierarchicalClustering .m file D:\Program Files\Wolfram
> Research\Mathematica\7.0\AddOns\Packages\HierarchicalClustering directory=
, I
> find
> If[ Not@ValueQ[DistanceMatrix::usage],
>  DistanceMatrix::usage = "DistanceMatrix[list] computes the \
>   symmetric matrix of distance or dissimilarity coefficients between \
> the elements of list."]
> If I do
> Needs["HierarchicalClustering`"]
> ?DistanceMatrix
> then I get  
> DistanceMatrix [ list ] gives a matrix of distances or dissimilarities
> between the elements of  list . >>
> which is not what the usage message says
> Then I try to find the code for the function DistanceMatrix, but I do not
> find it in this file. Where is it? Is it hidden in the Kernel?
> If it is in the Kernel, why is it not available without loading
> HierarchicalClustering?
> Ingolf Dahl
> Sweden
> e-mail: ingolf.d... at

  • Prev by Date: Nest and Fold don't respect HoldFirst?
  • Next by Date: Re: Creating a hybrid cell
  • Previous by thread: Where is the code for DistanceMatrix?
  • Next by thread: Re: Where is the code for DistanceMatrix?