Chapter two estructured
materials, cost function added