Metamorphic rocks are classified according to whether they