edomain.cc: move sample computation completely to EDomain