# Use custom defined metric(not matrix) in Javaplex

I'm about to get started trying to use Javaplex for the first time for some application in topological data analysis (TDA) and I want to use a custom defined metric. From looking over the documents, I can do this if I build the distance matrix for all of my points. My question is twofold:

1. Can I do it by just defining the metric between two points (it's a simple function to define, just the Euclidean cross-product metric between a Euclidean space and a circle)

and if so,

1. Would it make sense computationally, or should I just build the distance matrix for each of my datasets? For the context, I have 800 datasets, each with about 40-50 points on a torus in $(x,y,\theta)$-coordinates, so I need to define my torus metric.