Skip to content

Commit

Permalink
refactor!:Using paclets instead of importing packages from GitHub.
Browse files Browse the repository at this point in the history
  • Loading branch information
antononcube committed Sep 8, 2023
1 parent 3265e7c commit 45c17c4
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions MonadicProgramming/MonadicGeometricNearestNeighbors.m
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,6 @@ The primary motivation for making this Geometric Nearest Neighbors (GNN) softwar
*)

(**************************************************************)
(* Importing packages (if needed) *)
(**************************************************************)

If[Length[DownValues[MathematicaForPredictionUtilities`RecordsSummary]] == 0,
Echo["MathematicaForPredictionUtilities.m", "Importing from GitHub:"];
Import["https://raw.githubusercontent.com/antononcube/MathematicaForPrediction/master/MathematicaForPredictionUtilities.m"]
];


(**************************************************************)
(* Package definition *)
(**************************************************************)
Expand Down Expand Up @@ -128,16 +118,18 @@ The primary motivation for making this Geometric Nearest Neighbors (GNN) softwar
GNNMonComputeAdjacencyMatrix::usage = "GNNMonComputeAdjacencyMatrix[ n_Integer | {n_Integer, r_?NumericQ}, opts] computes the adjacency \
(distance) matrix for specified number of nearest neighbors and max radius.";

PacletInstall["AntonAntonov`StateMonadCodeGenerator`", AllowVersionUpdate -> False];
PacletInstall["AntonAntonov`SSparseMatrix`", AllowVersionUpdate -> False];
PacletInstall["AntonAntonov`OutlierIdentifiers`", AllowVersionUpdate -> False];
PacletInstall["AntonAntonov/MonadMakers", AllowVersionUpdate -> False];
PacletInstall["AntonAntonov/SSparseMatrix", AllowVersionUpdate -> False];
PacletInstall["AntonAntonov/OutlierIdentifiers", AllowVersionUpdate -> False];
PacletInstall["AntonAntonov/DataReshapers", AllowVersionUpdate -> False];

Begin["`Private`"];

Needs["MathematicaForPredictionUtilities`"];
Needs["StateMonadCodeGenerator`"];
Needs["OutlierIdentifiers`"];
Needs["SSparseMatrix`"];
(* Needs["MathematicaForPredictionUtilities`"]; *)
Needs["AntonAntonov`MonadMakers`"];
Needs["AntonAntonov`OutlierIdentifiers`"];
Needs["AntonAntonov`SSparseMatrix`"];
Needs["AntonAntonov`DataReshapers`"];

(**************************************************************)
(* Generation *)
Expand Down Expand Up @@ -183,7 +175,7 @@ The primary motivation for making this Geometric Nearest Neighbors (GNN) softwar
GNNMonUnit[ AssociationThread[ Range @ Length @ xs, N @ Normal @ xs ], context ],

TrueQ[ Head[xs] === Dataset ],
(* DatasetToMatrix is implemented in MathematicaForPredictionUtilities.m *)
(* DatasetToMatrix is implemented in the paclet "AntonAntnov/DataReshapers" *)
mat =
DatasetToMatrix[
xs,
Expand Down

0 comments on commit 45c17c4

Please sign in to comment.