Macaulay2 » Documentation
Packages » Bertini :: importIncidenceMatrix
next | previous | forward | backward | up | index | toc

# importIncidenceMatrix -- Imports an incidence matrix file after running makeMembershipFile.

- Usage:
    `importIncidenceMatrix(s)`
- Inputs:
  - s, a string, The directory where the file is stored.
- Optional inputs:
  - NameIncidenceMatrixFile (missing documentation) => ..., default value "incidence_matrix",
  - StorageFolder (missing documentation) => ..., default value null,
  - Verbose => ..., default value false, Option to silence additional output

## Description

After running makeMembershipFile Bertini produces an incidence_matrix file. The incidence_matrix says which points belong to which components. Our incidence matrix is flattened to a list. The number of elements in theIM is equal to the number of points in the solutions file. Each element of theIM is a list of sequences of 2 elements (codim,component Number). Note that we follow the Bertini convention and switch from (dimension,component number) indexing to (codimension,component number) indexing.

If the NameIncidenceMatrixFile option is set when we want to import files with a different name.

    i1 : makeB'InputFile(storeBM2Files,
             BertiniInputConfiguration=>{{TrackType,1}},    AffVariableGroup=>{x,y,z},    B'Polynomials=>{"z*((x+y+z)^3-1)","z*(y^2-3+z)"}    );

    i2 : runBertini(storeBM2Files)

    i3 : makeSampleSolutionsFile(storeBM2Files,2,SpecifyComponent=>{1,0})

    i4 : makeMembershipFile(storeBM2Files,NameSolutionsFile=>"sample_solutions_file")

    i5 : theIM=importIncidenceMatrix(storeBM2Files)

    o5 = {{(2, 0)}, {(2, 0)}}

    o5 : List

## Ways to use importIncidenceMatrix:

- `importIncidenceMatrix(String)`

## For the programmer

The object importIncidenceMatrix is a method function with options.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Bertini.m2:3222:0.