# Path: pomp/klampt/vectorops.py
# def add(*items):
# def madd(a,b,c):
# def sub(a,b):
# def mul(a,b):
# def div(a,b):
# def maximum(a,b):
# def minimum(a,b):
# def dot(a,b):
# def normSquared(a):
# def norm(a):
# def unit(a,epsilon=1e-5):
# def norm_L1(a):
# def norm_Linf(a):
# def distanceSquared(a,b):
# def distance(a,b):
# def cross(a,b):
# def interpolate(a,b,u):


import math
from ..klampt import vectorops

def euclideanMetric(a,b):
    return vectorops.distance(a,b)

def L2Metric(a,b):
    return euclideanMetric(a,b)

def L1Metric(a,b):
    return sum(abs(ai-bi) for (ai,bi) in zip(a,b))

def LinfMetric(a,b):
    return max(abs(ai-bi) for (ai,bi) in zip(a,b))

class WeightedEuclideanMetric:

# Path: pomp/klampt/vectorops.py
# def add(*items):
# def madd(a,b,c):
# def sub(a,b):
# def mul(a,b):
# def div(a,b):
# def maximum(a,b):
# def minimum(a,b):
# def dot(a,b):
# def normSquared(a):
# def norm(a):
# def unit(a,epsilon=1e-5):
# def norm_L1(a):
# def norm_Linf(a):
# def distanceSquared(a,b):
# def distance(a,b):
# def cross(a,b):
# def interpolate(a,b,u):


# Path: pomp/spaces/metric.py
import math
from ..klampt import vectorops


def euclideanMetric(a,b):
    return vectorops.distance(a,b)

def L2Metric(a,b):
    return euclideanMetric(a,b)

def L1Metric(a,b):
    return sum(abs(ai-bi) for (ai,bi) in zip(a,b))

def LinfMetric(a,b):
    return max(abs(ai-bi) for (ai,bi) in zip(a,b))

class WeightedEuclideanMetric:

    def __init__(self,w):