moved error checking to doubles for simplex in categorical, still not maximally efficient because of alloc of new vector