Local atomic structure of amorphous and crystalline alloys: Computer simulation