Skip to content
Permalink
Browse files

Rename Geodesic

  • Loading branch information...
davreev committed Aug 23, 2018
1 parent 65b479a commit dcf533c0ba8974592897fcd365041fe2db07a324
@@ -11,6 +11,8 @@
using Grasshopper.Kernel.Types;
using SpatialSlur.Fields;

using G = SpatialSlur.Fields.GeodesicDistance;

namespace SpatialSlur.Grasshopper.Components
{
/// <summary>
@@ -78,12 +80,12 @@ protected override void SolveInstance(IGH_DataAccess DA)
{
case DistanceMetric.Manhattan:
{
Geodesic.GetDistanceL1(cost, sources.Select(x => x.Value), result);
G.CalculateL1(cost, sources.Select(x => x.Value), result);
break;
}
case DistanceMetric.Euclidean:
{
Geodesic.GetDistanceL2(cost, sources.Select(x => x.Value), result);
G.CalculateL2(cost, sources.Select(x => x.Value), result);
break;
}
default:
@@ -13,7 +13,7 @@ namespace SpatialSlur.Fields
/// <summary>
///
/// </summary>
public static class Geodesic
public static class GeodesicDistance
{
#region Nested Types

@@ -102,7 +102,7 @@ public bool Solve(double x, double y, double weight, out double result)
/// <param name="sources"></param>
/// <param name="result"></param>
/// <param name="exclude"></param>
public static void GetDistanceL1(Grid2d grid, IEnumerable<int> sources, double[] result, IEnumerable<int> exclude = null)
public static void CalculateL1(Grid2d grid, IEnumerable<int> sources, double[] result, IEnumerable<int> exclude = null)
{
// impl ref
// http://www.numerical-tours.com/matlab/fastmarching_0_implementing/
@@ -173,7 +173,7 @@ void TryUpdate(double distance, int index)
/// <param name="sources"></param>
/// <param name="result"></param>
/// <param name="exclude"></param>
public static void GetDistanceL1(GridField2d<double> cost, IEnumerable<int> sources, double[] result, IEnumerable<int> exclude = null)
public static void CalculateL1(GridField2d<double> cost, IEnumerable<int> sources, double[] result, IEnumerable<int> exclude = null)
{
// impl ref
// http://www.numerical-tours.com/matlab/fastmarching_0_implementing/
@@ -245,7 +245,7 @@ void TryUpdate(double distance, int index)
/// <param name="sources"></param>
/// <param name="result"></param>
/// <param name="exclude"></param>
public static void GetDistanceL2(GridField2d<double> cost, IEnumerable<int> sources, double[] result, IEnumerable<int> exclude = null)
public static void CalculateL2(GridField2d<double> cost, IEnumerable<int> sources, double[] result, IEnumerable<int> exclude = null)
{
// impl ref
// http://www.numerical-tours.com/matlab/fastmarching_0_implementing/

0 comments on commit dcf533c

Please sign in to comment.
You can’t perform that action at this time.