How to call a mathematical space "$(\mathcal S, f)$" consisting of set $\mathcal S$ and function $f : \mathcal{S \times S} \rightarrow \mathbb R$? Is there a specific standard name for a mathematical space "$(\mathcal S, f)$"
consisting of a set $\mathcal S$ and a function $f : \mathcal{S \times S} \rightarrow \mathbb R$;
perhaps together with the ("obvious") additional property that $\forall A \in \mathcal S: f[~A, A~] = 0$
?
Some remarks:
The space "$(\mathcal S, f)$" I'm asking about presents a further generalization of the notion of a metric space "$(\mathcal M, d)$", including its various apparently more well-known generalizations since for all of them the function $d : \mathcal{M \times M} \rightarrow \mathbb R_{(\ge~0)}$, so they all involve the property $\forall A, B \in \mathcal M: d[~A, B~] \ge 0$.
In physics there's a well-known example of the kind of mathematical space I'm asking about, namely the space "$(\mathcal E, s^2)$", consisting of a (any suitable) set $\mathcal E$ of spacetime events and the function $s^2 : \mathcal{E \times E} \rightarrow \mathbb R$ expressing suitable spacetime intervals. This is of course known as (or at least closely related to) Minkowski space.
However, by definition of spacetime interval values $s^2$ they are applicable only to flat spacetime, i.e. with the additional property that for any 6 events $\in \mathcal E$ the corresponding Cayley-Menger determinant in terms of their 15 pairwise interval values vanishes. In other words, Minkowski space describes flat spacetime. But my question is concerned more generally with spaces which aren't necessarily flat.
 A: I don't think this type of space has its own field of study. Its too general. With just that condition on the function $f$ one could think of a thousand different structures without common features. Just choose any set $S$ define any function $\tilde{f}\colon S\times S\to\mathbb{R}$ and define $f\colon S\times S\to\mathbb{R}$ by $f(x,y)=\tilde{f}(x,y)$ if $x\neq y$ and $f(x,x)=0$. 
How would you distinguish interesting behavour for such a space when so many ridiculous candidates could fit the bill? 
Do you have any other conditions you can impose?
A: In naming the described mathematical space "$(\mathcal S, f)$", along with property $\forall A \in \mathcal S: f[~A, A~] = 0$ it is useful and in accordance with existing terminology for generalized metric spaces to consider explicitly the property $\forall A, B \in \mathcal S : f[~A, B~] = f[~B, A~]$ as well.
The mathematical space "$(\mathcal S, f)$" consisting of a set $\mathcal S$ and a function $f : \mathcal{S \times S} \rightarrow \mathbb R$
(i.e. specificly without requiring non-negativity) but together with properties
(1): $\forall A \in \mathcal S: f[~A, A~] = 0$ (indiscernability of the identical), and
(2): $\forall A, B \in \mathcal S : f[~A, B~] = f[~B, A~]$ (symmetry)
can be called a "hypometric space".
Accordingly, the mathematical space as described in the question, with property (1) but without requiring property (2), would be referred to as a "quasihypometric space".      
Requiring instead property (2), while dropping (1), would be called "metahypometric space"; etc.
