Skip to content

Commit a24d61c

Browse files
Improved doc comments - resolves #14 and resolves #16 [skip ci]
Co-authored-by: cho-thinkfree-com <117076481+cho-thinkfree-com@users.noreply.github.com>
1 parent 704ce5c commit a24d61c

4 files changed

Lines changed: 19 additions & 17 deletions

File tree

src/main/java/com/pgvector/PGbit.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ public class PGbit extends PGobject implements PGBinaryObject, Serializable, Clo
1919
private byte[] data;
2020

2121
/**
22-
* Constructor
22+
* @hidden
2323
*/
2424
public PGbit() {
2525
type = "bit";
2626
}
2727

2828
/**
29-
* Constructor
29+
* Creates a bit string from a boolean array
3030
*
3131
* @param v boolean array
3232
*/
@@ -40,7 +40,7 @@ public PGbit(boolean[] v) {
4040
}
4141

4242
/**
43-
* Constructor
43+
* Creates a bit string from a byte array
4444
*
4545
* @param v byte array
4646
*/
@@ -51,7 +51,7 @@ public PGbit(byte[] v) {
5151
}
5252

5353
/**
54-
* Constructor
54+
* Creates a bit string from a text representation
5555
*
5656
* @param s text representation of a bit string
5757
* @throws SQLException exception

src/main/java/com/pgvector/PGhalfvec.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ public class PGhalfvec extends PGobject implements Serializable, Cloneable {
2020
private float[] vec;
2121

2222
/**
23-
* Constructor
23+
* @hidden
2424
*/
2525
public PGhalfvec() {
2626
type = "halfvec";
2727
}
2828

2929
/**
30-
* Constructor
30+
* Creates a half vector from an array
3131
*
3232
* @param v float array
3333
*/
@@ -37,7 +37,7 @@ public PGhalfvec(float[] v) {
3737
}
3838

3939
/**
40-
* Constructor
40+
* Creates a half vector from a list
4141
*
4242
* @param <T> number
4343
* @param v list of numbers
@@ -56,7 +56,7 @@ public <T extends Number> PGhalfvec(List<T> v) {
5656
}
5757

5858
/**
59-
* Constructor
59+
* Creates a half vector from a text representation
6060
*
6161
* @param s text representation of a half vector
6262
* @throws SQLException exception

src/main/java/com/pgvector/PGsparsevec.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ public class PGsparsevec extends PGobject implements PGBinaryObject, Serializabl
2222
private float[] values;
2323

2424
/**
25-
* Constructor
25+
* @hidden
2626
*/
2727
public PGsparsevec() {
2828
type = "sparsevec";
2929
}
3030

3131
/**
32-
* Constructor
32+
* Creates a sparse vector from an array
3333
*
3434
* @param v float array
3535
*/
@@ -58,7 +58,7 @@ public PGsparsevec(float[] v) {
5858
}
5959

6060
/**
61-
* Constructor
61+
* Creates a sparse vector from a list
6262
*
6363
* @param <T> number
6464
* @param v list of numbers
@@ -95,7 +95,9 @@ public <T extends Number> PGsparsevec(List<T> v) {
9595
}
9696

9797
/**
98-
* Constructor
98+
* Creates a sparse vector from a map of non-zero elements
99+
* <p>
100+
* Indices start at 0
99101
*
100102
* @param <T> number
101103
* @param map map of non-zero elements
@@ -126,7 +128,7 @@ public <T extends Number> PGsparsevec(Map<Integer, T> map, int dimensions) {
126128
}
127129

128130
/**
129-
* Constructor
131+
* Creates a sparse vector from a text representation
130132
*
131133
* @param s text representation of a sparse vector
132134
* @throws SQLException exception

src/main/java/com/pgvector/PGvector.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ public class PGvector extends PGobject implements PGBinaryObject, Serializable,
1818
private float[] vec;
1919

2020
/**
21-
* Constructor
21+
* @hidden
2222
*/
2323
public PGvector() {
2424
type = "vector";
2525
}
2626

2727
/**
28-
* Constructor
28+
* Creates a vector from an array
2929
*
3030
* @param v float array
3131
*/
@@ -35,7 +35,7 @@ public PGvector(float[] v) {
3535
}
3636

3737
/**
38-
* Constructor
38+
* Creates a vector from a list
3939
*
4040
* @param <T> number
4141
* @param v list of numbers
@@ -54,7 +54,7 @@ public <T extends Number> PGvector(List<T> v) {
5454
}
5555

5656
/**
57-
* Constructor
57+
* Creates a vector from a text representation
5858
*
5959
* @param s text representation of a vector
6060
* @throws SQLException exception

0 commit comments

Comments
 (0)