Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: Where is the code for DistanceMatrix?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109290] Re: Where is the code for DistanceMatrix?
  • From: "Ingolf Dahl" <ingolf.dahl at telia.com>
  • Date: Tue, 20 Apr 2010 05:53:18 -0400 (EDT)

Thanks to all answerers to my question about the location of the code for
DistanceMatrix. Yes, it is in the Kernel, and the help is misleading:

"To use DistanceMatrix, you first need to load the Hierarchical Clustering
Package using Needs["HierarchicalClustering`"]"

I think that the following, or something similar, ought to be added:

"Alternatively, you might use the full name
HierarchicalClustering`DistanceMatrix. This works because the code for this
command is located in the Kernel (in the HierarchicalClustering` context),
and loaded when the Kernel is started." 

I also think the usage message in the HierarchicalClustering` package,
mentioning that a symmetric matrix is generated, is better than the usage
message generated by the Kernel, not mentioning this. I would prefer that
the symmetry was determined by the DistanceFunction used, or set by an extra
option, but that is my personal taste, and it might brake some code. I have
to write my own function for such cases.

Maybe this is badly documented because this is bad design and subject to
change? But bad design is just the case when the user really needs good
documentation.

I became curious: Are there sibling commands to DistanceMatrix, loadable in
the same way?
If I run the command Contexts[], I get a long list of different contexts,
loaded together with the Kernel. I deleted all contexts that started with
System`, and named the list list1. To get all commands with usage messages,
I run the command

withusagemessagelist1 = 
 Select[Flatten[Names[StringJoin[#, "*"]] & /@ list1],
  	    (StringQ[
     MessageName @@ Append[ToHeldExpression[#], "usage"]]) & ]

(There are many more commands without usage message) Then I obtain 221
commands and words, and many of them can probably be used without loading
their package, if the full name is specified. Some can be found in the
Mathematica Help, some are not found. And some of these packages are anyway
loaded from the beginning, check by running $Packages. The list follows
below.

Best regards

Ingolf Dahl
Sweden

Automatically loaded packages

{"ResourceLocator`", "DocumentationSearch`", "JLink`", \
"PacletManager`", "WebServices`", "System`", "Global`"}

The list:

{"BoxForm`AddCommas", "BoxForm`AddOptions", \
"DatabaseLink`DatabaseResourcesPath", "DatabaseLink`DataSources", \
"DatabaseLink`JDBCDriverNames", "DatabaseLink`SQLConnections", \
"Developer`BesselSimplify", "Developer`BoundingBox", \
"Developer`CellInformation", "Developer`FibonacciSimplify", \
"Developer`FindDivisions", "Developer`FromPackedArray", \
"Developer`GammaSimplify", "Developer`MachineIntegerQ", \
"Developer`NotebookConvert", "Developer`PackedArrayForm", \
"Developer`PackedArrayQ", "Developer`PartitionMap", \
"Developer`PolyGammaSimplify", "Developer`PolyLogSimplify", \
"Developer`ReplaceAllUnheld", "Developer`ToPackedArray", \
"Developer`TrigToRadicals", "Developer`ZeroQ", \
"Developer`ZetaSimplify", "Developer`$MaxMachineInteger", \
"DocumentationSearch`AddDocumentationDirectory", \
"DocumentationSearch`AddDocumentationNotebook", \
"DocumentationSearch`CloseDocumentationIndex", \
"DocumentationSearch`CloseDocumentationNotebookIndexer", \
"DocumentationSearch`CreateSpellIndex", \
"DocumentationSearch`DirectHitSearch", \
"DocumentationSearch`DocumentationIndexes", \
"DocumentationSearch`DocumentationNotebookIndexer", \
"DocumentationSearch`DocumentationSpellIndexes", \
"DocumentationSearch`ExportSearchResults", \
"DocumentationSearch`NewDocumentationNotebookIndexer", \
"DocumentationSearch`SearchDocumentation", \
"DocumentationSearch`SearchDocumentationMetaData", \
"DocumentationSearch`$NumberOfExtraPages", \
"Experimental`CircularSlider", "Experimental`CompileEvaluate", \
"Experimental`ExistsRealQ", "Experimental`ForAllRealQ", \
"Experimental`ImpliesQ", "Experimental`ImpliesRealQ", \
"Experimental`ValueFunction", "HierarchicalClustering`Agglomerate", \
"HierarchicalClustering`Cluster", \
"HierarchicalClustering`DirectAgglomerate", \
"HierarchicalClustering`DistanceMatrix", \
"HierarchicalClustering`Linkage", "Internal`BlockFlatten", \
"JLink`AddPeriodical", "JLink`AddToClassPath", \
"JLink`AllowRaggedArrays", "JLink`AllowShortContext", \
"JLink`AppletViewer", "JLink`BeginJavaBlock", "JLink`ByRef", \
"JLink`ClassName", "JLink`ClassPath", "JLink`CloseFrontEnd", \
"JLink`CommandLine", "JLink`ConnectToFrontEnd", "JLink`Constructors", \
"JLink`CreateExtraLinks", "JLink`DoModal", "JLink`EndJavaBlock", \
"JLink`EndModal", "JLink`FieldFunction", "JLink`Fields", \
"JLink`ForceLaunch", "JLink`FrontEndLink", "JLink`FrontEndSharedQ", \
"JLink`GetClass", "JLink`GetClassPath", "JLink`GetComplexClass", \
"JLink`GetJavaException", "JLink`GetJVM", \
"JLink`ImplementJavaInterface", "JLink`InstallJava", \
"JLink`InstanceOf", "JLink`Java", "JLink`JavaBlock", \
"JLink`JavaClass", "JLink`JavaClassPath", "JLink`JavaLink", \
"JLink`JavaNew", "JLink`JavaObject", "JLink`JavaObjectQ", \
"JLink`JavaObjectToExpression", "JLink`JavaShow", "JLink`JavaThrow", \
"JLink`JavaUILink", "JLink`JavaWindowToFront", "JLink`JVM", \
"JLink`JVMArguments", "JLink`KeepJavaObject", "JLink`KeepObjects", \
"JLink`KernelSharedQ", "JLink`LoadClass", "JLink`LoadedJavaClasses", \
"JLink`LoadedJavaObjects", "JLink`LoadJavaClass", \
"JLink`MakeJavaExpr", "JLink`MakeJavaObject", "JLink`MethodFunction", \
"JLink`Methods", "JLink`ParentClass", "JLink`PeekClasses", \
"JLink`PeekObjects", "JLink`Periodical", "JLink`Periodicals", \
"JLink`QuitJava", "JLink`RegisterJavaInitialization", \
"JLink`ReinstallJava", "JLink`ReleaseJavaObject", \
"JLink`ReleaseObject", "JLink`RemovePeriodical", "JLink`RestartJava", \
"JLink`ReturnAsJavaObject", "JLink`SameObjectQ", "JLink`ServiceJava", \
"JLink`SetComplexClass", "JLink`SetField", "JLink`SetInternetProxy", \
"JLink`SetPeriodicalInterval", "JLink`ShareFrontEnd", \
"JLink`ShareKernel", "JLink`SharingLinks", "JLink`SharingPrompt", \
"JLink`ShowJavaConsole", "JLink`StartJava", "JLink`StaticsVisible", \
"JLink`UninstallJava", "JLink`UnshareFrontEnd", \
"JLink`UnshareKernel", "JLink`UseFrontEnd", "JLink`UseJVM", \
"JLink`UseTypeChecking", "JLink`Val", "JLink`$ExtraClassPath", \
"JLink`$FrontEndInitializationFunction", \
"JLink`$FrontEndLaunchCommand", "JLink`$JavaExceptionHandler", \
"JLink`$RelaxedTypeChecking", "JLink`$ThisPeriodical", \
"NETLink`LoadedNETAssemblies", "NETLink`LoadedNETTypes", \
"NETLink`LoadNETType", "NETLink`NETLink", "NETLink`NETObjectQ", \
"GetVirtualCellGroup", "PackPaclet", "Paclet", "PacletCheckUpdate", \
"PacletDirectoryAdd", "PacletDirectoryRemove", "PacletDisable", \
"PacletEnable", "PacletFind", "PacletFindRemote", \
"PacletInformation", "PacletInstall", "PacletInstallQueued", \
"PacletManager", "PacletManagerEnabled", "PacletNewerQ", \
"PacletResource", "PacletSetLoading", "PacletSite", "PacletSiteAdd", \
"PacletSiteRemove", "PacletSiteRename", "PacletSites", \
"PacletSiteUpdate", "PacletUninstall", "PacletUpdate", \
"RebuildPacletData", "RestartPacletManager", "SetInternetProxy", \
"SetInternetProxyCredentials", "UnpackPaclet", "UseInternetProxy", \
"$AllowDataUpdates", "$AllowDocumentationUpdates", "$AllowInternet", \
"$InternetProxyRules", "$PacletSite", "$UserBasePacletsDirectory", \
"ResourceLocator`ApplicationAdd", \
"ResourceLocator`ApplicationDataDirectory", \
"ResourceLocator`ApplicationDataUserDirectory", \
"ResourceLocator`ApplicationDirectoriesLocate", \
"ResourceLocator`ApplicationDirectoryAdd", \
"ResourceLocator`ApplicationsLocate", \
"ResourceLocator`CreateDataDirectory", \
"ResourceLocator`PreferencesDelete", \
"ResourceLocator`PreferencesRead", \
"ResourceLocator`PreferencesWrite", "ResourceLocator`ResourceAdd", \
"ResourceLocator`ResourcesLocate", \
"ResourceLocator`TextResourceFunction", \
"ResourceLocator`TextResourceLoad", "FromServiceResponse", \
"InstallServiceOperation", "InvokeServiceOperation", \
"ToServiceRequest", "$InstalledServices", "$PrintServiceRequest", \
"$PrintServiceResponse", "$PrintShortErrorMessages", \
"$PrintWSDLDebug", "XML`FromSymbolicXML", "XML`RawXML", \
"XML`SymbolicXMLErrors", "XML`SymbolicXMLQ", "XML`ToCompactXML", \
"XML`ToSymbolicXML", "XML`ToVerboseXML"}




  • Prev by Date: Re: ArrayPlot coordinates scaling for overlays
  • Next by Date: Re: How can I make graphics unselectable?
  • Previous by thread: Re: Where is the code for DistanceMatrix?
  • Next by thread: London Computational Knowledge Summit