Structure transformations of the decagonal and icosahedral phases in quaternary alloys