pelican-plugin
v0.0.9
Published
Calculate gaussian curve
Downloads
2
Maintainers
Readme
typescript
import { Component } from '@angular/core';
import { Plugins } from '@capacitor/core';
const { Gaussiancf } = Plugins;
@Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss'],
})
export class HomePage {
results: any;
constructor() {
}
async gaussianCurveFitter() {
Gaussiancf.gaussianCurveFitter({value: JSON.stringify({x: [10, 20, 30, 40, 50, 60, 70, 80, 90, 100], y: [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]})})
.then(result => {
console.log(result.value);
console.log(JSON.parse(result.value).length);
this.results = result;
});
}
}
mainactivity.java
package io.ionic.starter;
import android.os.Bundle;
import com.getcapacitor.BridgeActivity;
import com.getcapacitor.Plugin;
import com.bhavik.Gaussiancf.plugin.Gaussiancf; // Add this line
import java.util.ArrayList;
public class MainActivity extends BridgeActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Initializes the Bridge
this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
// Additional plugins you've installed go here
// Ex: add(TotallyAwesomePlugin.class);
add(Gaussiancf.class); // Add this line
}});
}
}