Skip to content

Commit

Permalink
Removing unused toStateObject() functions, see #66
Browse files Browse the repository at this point in the history
  • Loading branch information
AgustinVallejo committed Dec 6, 2024
1 parent 4b4754a commit e1cfb93
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 deletions.
19 changes: 0 additions & 19 deletions js/photons/model/Photon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,6 @@ export class QuantumPossibleState {
);
}
} );

public toStateObject(): QuantumPossibleStateStateObject {
return {
position: Vector2.Vector2IO.toStateObject( this.position ),
direction: Vector2.Vector2IO.toStateObject( this.direction ),
probability: this.probability,
polarization: this.polarization
};
}
}

export default class Photon {
Expand Down Expand Up @@ -181,16 +172,6 @@ export default class Photon {
);
}
} );

private toStateObject(): PhotonStateObject {
return {
polarizationAngle: this.polarizationAngle,
possibleStates: {
vertical: this.possibleStates.vertical.toStateObject(),
horizontal: this.possibleStates.horizontal.toStateObject()
}
};
}
}

type TwoStateQuantumPossibleState = {
Expand Down
12 changes: 1 addition & 11 deletions js/photons/model/PhotonCollection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Tandem from '../../../../tandem/js/Tandem.js';
import IOType from '../../../../tandem/js/types/IOType.js';
import ReferenceArrayIO from '../../../../tandem/js/types/ReferenceArrayIO.js';
import quantumMeasurement from '../../quantumMeasurement.js';
import Photon, { PhotonStateObject } from './Photon.js';
import Photon from './Photon.js';

export class PhotonCollection extends PhetioObject {

Expand Down Expand Up @@ -56,16 +56,6 @@ export class PhotonCollection extends PhetioObject {
photons: ReferenceArrayIO( Photon.PhotonIO )
}
} );

private toStateObject(): PhotonCollectionStateObject {
return {
photons: this.photons.map( photon => Photon.PhotonIO.toStateObject( photon ) )
};
}
}

type PhotonCollectionStateObject = {
photons: PhotonStateObject[];
};

quantumMeasurement.register( 'PhotonCollection', PhotonCollection );

0 comments on commit e1cfb93

Please sign in to comment.