1. A method for modeling data structures, comprising: (a) calculating a contextual distance between a selected data point in a data sample and a data point in a contextual set of the selected data point, wherein the contextual set comprises the selected data point and one or more data points in the neighborhood of the selected data point and wherein the contextual distance is the difference between the selected data point's contribution to the integrity of the geometric structure of the contextual set and the data point's contribution to the integrity of the geometric structure of the contextual set; (b) repeating step (a) for each data point in the contextual set of the selected data point; (c) repeating steps (a)-(b) for each selected data point in the data sample; and (d) creating a digraph using a plurality of contextual distances generated in steps (a)-(c).