added function abstraction in steinertreeinstance, TODO:fix loop in metricspace or physical space