Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
SurgeArrester authored Aug 24, 2022
1 parent 05c9dcf commit fd9bc07
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ Calculate the distance to a second object with the `elmd` method.
0.2
```

If the assignment plan (how each element in the source composition is mapped to the target composition) is required, this may be returned by setting the `return_assignments` flag in the `elmd` method.

```python
> x.elmd("SrTiO3", return_assignments=True)
(0.2, array([0.2, 0. , 0. , 0. , 0.2, 0. , 0. , 0. , 0.6]))
```

If the `mod_petti` elemental scale is suitable and no assignment plan is required, a significantly faster EMD algorithm may be used by setting `metric="fast"`
```python
> x = ElMD("CaTiO3", metric="fast")
> x.elmd("SrTiO3")
0.2
```

The compositional parser can handle user defined values of `x` when this is applicable.

```python
Expand Down

0 comments on commit fd9bc07

Please sign in to comment.